Skip to content

Commit 33968bd

Browse files
tytalustytalus
authored andcommitted
Chaging the tests once more since we were swallowing the original error message
1 parent fadd3ab commit 33968bd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/integration/test_data_rows.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,13 @@ def test_data_row_bulk_creation_with_same_global_keys(dataset, sample_image):
636636
assert task.status == "FAILED"
637637
assert len(task.failed_data_rows) > 0
638638
assert len(list(dataset.data_rows())) == 0
639+
errorMsg = (
640+
"Failed to create data rows after 5 retries. "
641+
"This chunk's data rows will not be imported. "
642+
"Retry by appending them to the dataset. "
643+
"Error: Data rows contain empty string or duplicate global keys, which are not allowed"
644+
)
645+
assert task.errors == errorMsg
639646

640647
task = dataset.create_data_rows([{
641648
DataRow.row_data: sample_image,

tests/integration/test_task.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from labelbox import DataRow, Task
3+
from labelbox import DataRow
44
from labelbox.schema.data_row_metadata import DataRowMetadataField
55

66
EMBEDDING_SCHEMA_ID = "ckpyije740000yxdk81pbgjdc"
@@ -27,7 +27,6 @@ def test_task_errors(dataset, image_url):
2727
assert task.status == "FAILED"
2828
assert len(task.failed_data_rows) > 0
2929
assert task.errors is not None
30-
assert task.errors == "Failed to create data rows after 5 retries. This chunk's data rows will not be imported. Retry by appending them to the dataset."
3130

3231
def test_task_success_json(dataset, image_url):
3332
client = dataset.client

0 commit comments

Comments
 (0)