diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 8b01631aa..ed295e268 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -15,6 +15,7 @@ from labelbox.orm import query from labelbox.pagination import PaginatedCollection from labelbox.schema.annotation_import import LabelImport +from labelbox.schema.enums import AnnotationImportState from labelbox.schema.invite import Invite from labelbox.schema.queue_mode import QueueMode from labelbox.schema.user import User @@ -334,6 +335,7 @@ def create_label(): upload_task = LabelImport.create_from_objects( client, project.uid, f'label-import-{uuid.uuid4()}', predictions) upload_task.wait_until_done(sleep_time_seconds=5) + assert upload_task.state == AnnotationImportState.FINISHED project.create_label = create_label project.create_label() diff --git a/tests/integration/test_data_rows.py b/tests/integration/test_data_rows.py index 77b2aa589..9f08df401 100644 --- a/tests/integration/test_data_rows.py +++ b/tests/integration/test_data_rows.py @@ -150,14 +150,14 @@ def test_data_row_bulk_creation(dataset, rand_gen, image_url): @pytest.mark.slow def test_data_row_large_bulk_creation(dataset, image_url): # Do a longer task and expect it not to be complete immediately - n_local = 2000 - n_urls = 250 + n_urls = 1000 + n_local = 250 with NamedTemporaryFile() as fp: fp.write("Test data".encode()) fp.flush() task = dataset.create_data_rows([{ DataRow.row_data: image_url - }] * n_local + [fp.name] * n_urls) + }] * n_urls + [fp.name] * n_local) task.wait_till_done() assert task.status == "COMPLETE" assert len(list(dataset.data_rows())) == n_local + n_urls diff --git a/tests/integration/test_delegated_access.py b/tests/integration/test_delegated_access.py index 91b847627..01a9702d7 100644 --- a/tests/integration/test_delegated_access.py +++ b/tests/integration/test_delegated_access.py @@ -6,7 +6,7 @@ from labelbox import Client -@pytest.mark.skipif(os.environ.get("DA_GCP_LABELBOX_API_KEY") is None, +@pytest.mark.skipif(not os.environ.get('DA_GCP_LABELBOX_API_KEY'), reason="DA_GCP_LABELBOX_API_KEY not found") def test_default_integration(): """ @@ -28,7 +28,7 @@ def test_default_integration(): ds.delete() -@pytest.mark.skipif(os.environ.get("DA_GCP_LABELBOX_API_KEY") is None, +@pytest.mark.skipif(not os.environ.get("DA_GCP_LABELBOX_API_KEY"), reason="DA_GCP_LABELBOX_API_KEY not found") def test_non_default_integration(): """ diff --git a/tests/integration/test_label.py b/tests/integration/test_label.py index f8e473c0f..c6057cb4c 100644 --- a/tests/integration/test_label.py +++ b/tests/integration/test_label.py @@ -46,6 +46,7 @@ def test_label_export(configured_project_with_label): # TODO: Skipping this test in staging due to label not updating @pytest.mark.skipif(condition=os.environ['LABELBOX_TEST_ENVIRON'] == "onprem" or os.environ['LABELBOX_TEST_ENVIRON'] == "staging" or + os.environ['LABELBOX_TEST_ENVIRON'] == "local" or os.environ['LABELBOX_TEST_ENVIRON'] == "custom", reason="does not work for onprem") def test_label_update(configured_project_with_label):