Skip to content

Commit 242c3fb

Browse files
author
Val Brodsky
committed
Refactor get datarows tests so that I can reuse some fixtures
1 parent 994b6da commit 242c3fb

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

libs/labelbox/tests/integration/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
from typing import Type
88

99
import pytest
10+
<<<<<<< HEAD
11+
=======
12+
from constants import (
13+
CAPTURE_DT_SCHEMA_ID,
14+
SPLIT_SCHEMA_ID,
15+
TEST_SPLIT_ID,
16+
TEXT_SCHEMA_ID,
17+
)
18+
>>>>>>> a4fe5b93 (Refactor get datarows tests so that I can reuse some fixtures)
1019

1120
from labelbox import (
1221
Classification,
@@ -24,6 +33,7 @@
2433
from labelbox.schema.ontology_kind import OntologyKind
2534
from labelbox.schema.queue_mode import QueueMode
2635
from labelbox.schema.user import User
36+
<<<<<<< HEAD
2737

2838

2939
@pytest.fixture
@@ -48,6 +58,8 @@ def constants():
4858
"EXPECTED_METADATA_SCHEMA_IDS": EXPECTED_METADATA_SCHEMA_IDS,
4959
"CUSTOM_TEXT_SCHEMA_NAME": CUSTOM_TEXT_SCHEMA_NAME,
5060
}
61+
=======
62+
>>>>>>> a4fe5b93 (Refactor get datarows tests so that I can reuse some fixtures)
5163

5264

5365
@pytest.fixture

libs/labelbox/tests/integration/test_data_rows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def test_create_data_row_with_metadata_dict(
405405
row_data=image_url, metadata_fields=make_metadata_fields_dict
406406
)
407407

408-
assert len(list(dataset.data_rows())) == 1
408+
assert len([dr for dr in dataset.data_rows()]) == 1
409409
assert data_row.dataset() == dataset
410410
assert data_row.created_by() == client.get_user()
411411
assert data_row.organization() == client.get_organization()

0 commit comments

Comments
 (0)