From 6eacf99598f1237d890853132a16249d153a1b0f Mon Sep 17 00:00:00 2001 From: Val Brodsky Date: Mon, 18 Dec 2023 10:04:26 -0800 Subject: [PATCH 1/2] Update video expected data due to fix for segments export --- tests/integration/annotation_import/fixtures/export_v2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/annotation_import/fixtures/export_v2.py b/tests/integration/annotation_import/fixtures/export_v2.py index 9bd96e8e6..869999a5c 100644 --- a/tests/integration/annotation_import/fixtures/export_v2.py +++ b/tests/integration/annotation_import/fixtures/export_v2.py @@ -147,7 +147,9 @@ def expected_export_v2_text(): def expected_export_v2_video(): expected_annotations = { 'frames': {}, - 'segments': {}, + 'segments': { + '': [[7, 13], [18, 19]] + }, 'key_frame_feature_map': {}, 'classifications': [{ 'name': 'checklist', From 3f6a9b9fd02d864098023e8f68998c3ca1a6a814 Mon Sep 17 00:00:00 2001 From: Val Brodsky Date: Mon, 18 Dec 2023 10:04:59 -0800 Subject: [PATCH 2/2] Fix create batch negative tests due to change in batch priority rules --- tests/integration/test_batch.py | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/tests/integration/test_batch.py b/tests/integration/test_batch.py index 8a81017b5..7f4d1bfa3 100644 --- a/tests/integration/test_batch.py +++ b/tests/integration/test_batch.py @@ -65,43 +65,22 @@ def test_create_batch_with_non_existent_global_keys(project: Project): ) == "Data rows with the following global keys do not exist: key1." -def test_create_batch_with_negative_priority(project: Project, - small_dataset: Dataset): +def test_create_batch_with_string_priority(project: Project, + small_dataset: Dataset): with pytest.raises(LabelboxError): project.create_batch("batch1", data_rows=get_data_row_ids(small_dataset), - priority=-1) + priority="abcd") def test_create_batch_with_null_priority(project: Project, small_dataset: Dataset): - with pytest.raises(LabelboxError): - project.create_batch("batch1", - data_rows=get_data_row_ids(small_dataset), - priority=0) - with pytest.raises(LabelboxError): project.create_batch("batch1", data_rows=get_data_row_ids(small_dataset), priority=None) -def test_create_batch_with_out_of_bound_priority(project: Project, - small_dataset: Dataset): - with pytest.raises(LabelboxError): - project.create_batch("batch1", - data_rows=get_data_row_ids(small_dataset), - priority=6) - - -def test_create_batch_with_float_number_priority(project: Project, - small_dataset: Dataset): - with pytest.raises(LabelboxError): - project.create_batch("batch1", - data_rows=get_data_row_ids(small_dataset), - priority=4.9) - - def test_create_batch_async(project: Project, big_dataset_data_row_ids: List[str]): batch = project._create_batch_async("big-batch",