1414def test_create_from_url (client , project , annotation_import_test_helpers ):
1515 name = str (uuid .uuid4 ())
1616 url = "https://storage.googleapis.com/labelbox-public-bucket/predictions_test_v2.ndjson"
17- label_import = LabelImport .create_from_url (client = client , project_id = project .uid , name = name , url = url )
18- assert label_import .parent_id == project .uid
17+ label_import = LabelImport .create_from_url (client = client ,
18+ project_id = project .uid ,
19+ name = name ,
20+ url = url )
21+ assert label_import .parent_id == project .uid
1922 annotation_import_test_helpers .check_running_state (label_import , name , url )
2023
2124
22- def test_create_from_objects (client , project , object_predictions , annotation_import_test_helpers ):
25+ def test_create_from_objects (client , project , object_predictions ,
26+ annotation_import_test_helpers ):
2327 name = str (uuid .uuid4 ())
2428
25- label_import = LabelImport .create_from_objects (client = client , project_id = project .uid , name = name , labels = object_predictions )
26- assert label_import .parent_id == project .uid
29+ label_import = LabelImport .create_from_objects (client = client ,
30+ project_id = project .uid ,
31+ name = name ,
32+ labels = object_predictions )
33+ assert label_import .parent_id == project .uid
2734 annotation_import_test_helpers .check_running_state (label_import , name )
28- annotation_import_test_helpers .assert_file_content (label_import .input_file_url , object_predictions )
35+ annotation_import_test_helpers .assert_file_content (
36+ label_import .input_file_url , object_predictions )
2937
3038
3139# TODO: add me when we add this ability
@@ -48,7 +56,10 @@ def test_get(client, project, annotation_import_test_helpers):
4856 name = str (uuid .uuid4 ())
4957 url = "https://storage.googleapis.com/labelbox-public-bucket/predictions_test_v2.ndjson"
5058
51- label_import = LabelImport .create_from_url (client = client , project_id = project .uid , name = name , url = url )
59+ label_import = LabelImport .create_from_url (client = client ,
60+ project_id = project .uid ,
61+ name = name ,
62+ url = url )
5263
5364 assert label_import .parent_id == project .uid
5465 annotation_import_test_helpers .check_running_state (label_import , name , url )
@@ -57,7 +68,10 @@ def test_get(client, project, annotation_import_test_helpers):
5768@pytest .mark .slow
5869def test_wait_till_done (client , project , predictions ):
5970 name = str (uuid .uuid4 ())
60- label_import = LabelImport .create_from_objects (client = client , project_id = project .uid , name = name , labels = predictions )
71+ label_import = LabelImport .create_from_objects (client = client ,
72+ project_id = project .uid ,
73+ name = name ,
74+ labels = predictions )
6175
6276 assert len (label_import .inputs ) == len (predictions )
6377 label_import .wait_until_done ()
@@ -68,9 +82,7 @@ def test_wait_till_done(client, project, predictions):
6882 # # Check that the status files are being returned as expected
6983 # assert len(label_import.errors) == 0
7084 assert len (label_import .inputs ) == len (predictions )
71- input_uuids = [
72- input_annot ['uuid' ] for input_annot in label_import .inputs
73- ]
85+ input_uuids = [input_annot ['uuid' ] for input_annot in label_import .inputs ]
7486 inference_uuids = [pred ['uuid' ] for pred in predictions ]
7587 assert set (input_uuids ) == set (inference_uuids )
7688 assert len (label_import .statuses ) == len (predictions )
@@ -80,4 +92,3 @@ def test_wait_till_done(client, project, predictions):
8092 input_annot ['uuid' ] for input_annot in label_import .statuses
8193 ]
8294 assert set (input_uuids ) == set (status_uuids )
83-
0 commit comments