Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/test_data_rows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_delegated_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
"""
Expand All @@ -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():
"""
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down