Skip to content

Commit 2b5061e

Browse files
author
Kevin Kim
committed
Polishing some sdk tests
1 parent 226944a commit 2b5061e

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

tests/integration/test_data_rows.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ def test_data_row_bulk_creation(dataset, rand_gen, image_url):
150150
@pytest.mark.slow
151151
def test_data_row_large_bulk_creation(dataset, image_url):
152152
# Do a longer task and expect it not to be complete immediately
153-
n_local = 2000
154-
n_urls = 250
153+
n_urls = 1000
154+
n_local = 250
155155
with NamedTemporaryFile() as fp:
156156
fp.write("Test data".encode())
157157
fp.flush()
158158
task = dataset.create_data_rows([{
159159
DataRow.row_data: image_url
160-
}] * n_local + [fp.name] * n_urls)
160+
}] * n_urls + [fp.name] * n_local)
161161
task.wait_till_done()
162162
assert task.status == "COMPLETE"
163163
assert len(list(dataset.data_rows())) == n_local + n_urls

tests/integration/test_delegated_access.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from labelbox import Client
77

88

9-
@pytest.mark.skipif(os.environ.get("DA_GCP_LABELBOX_API_KEY") is None,
9+
@pytest.mark.skipif(os.environ.get("DA_GCP_LABELBOX_API_KEY") == "",
1010
reason="DA_GCP_LABELBOX_API_KEY not found")
1111
def test_default_integration():
1212
"""
@@ -28,7 +28,7 @@ def test_default_integration():
2828
ds.delete()
2929

3030

31-
@pytest.mark.skipif(os.environ.get("DA_GCP_LABELBOX_API_KEY") is None,
31+
@pytest.mark.skipif(os.environ.get("DA_GCP_LABELBOX_API_KEY") == "",
3232
reason="DA_GCP_LABELBOX_API_KEY not found")
3333
def test_non_default_integration():
3434
"""

tests/integration/test_label.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def test_label_export(configured_project_with_label):
4646
# TODO: Skipping this test in staging due to label not updating
4747
@pytest.mark.skipif(condition=os.environ['LABELBOX_TEST_ENVIRON'] == "onprem" or
4848
os.environ['LABELBOX_TEST_ENVIRON'] == "staging" or
49+
os.environ['LABELBOX_TEST_ENVIRON'] == "local" or
4950
os.environ['LABELBOX_TEST_ENVIRON'] == "custom",
5051
reason="does not work for onprem")
5152
def test_label_update(configured_project_with_label):

0 commit comments

Comments
 (0)