File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ def test_generator(list_of_labels):
6161
6262def test_conversion (list_of_labels ):
6363 generator = LabelGenerator (list_of_labels )
64- label_collection = generator . as_list ( )
64+ label_collection = list ( generator )
6565 assert len (label_collection ) == len (list_of_labels )
6666 assert [x for x in label_collection ] == list_of_labels
6767
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def test_image(file_path):
2020 payload = json .load (f )
2121
2222 collection = LBV1Converter .deserialize (payload )
23- collection_as_list = collection . as_list ( )
23+ collection_as_list = list ( collection )
2424
2525 assert len (collection_as_list ) == 2
2626
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ def test_classification():
99 with open ('tests/data/assets/ndjson/classification_import.json' ,
1010 'r' ) as file :
1111 data = json .load (file )
12- res = NDJsonConverter .deserialize (data ). as_list ( )
12+ res = list ( NDJsonConverter .deserialize (data ))
1313 res = list (NDJsonConverter .serialize (res ))
1414 assert res == data
1515
@@ -18,6 +18,6 @@ def test_classification_with_name():
1818 with open ('tests/data/assets/ndjson/classification_import_name_only.json' ,
1919 'r' ) as file :
2020 data = json .load (file )
21- res = NDJsonConverter .deserialize (data ). as_list ( )
21+ res = list ( NDJsonConverter .deserialize (data ))
2222 res = list (NDJsonConverter .serialize (res ))
2323 assert res == data
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def test_pdf():
2222 """
2323 with open ('tests/data/assets/ndjson/pdf_import.json' , 'r' ) as f :
2424 data = json .load (f )
25- res = NDJsonConverter .deserialize (data ). as_list ( )
25+ res = list ( NDJsonConverter .deserialize (data ))
2626 res = list (NDJsonConverter .serialize (res ))
2727 assert [round_dict (x ) for x in res ] == [round_dict (x ) for x in data ]
2828 f .close ()
@@ -34,7 +34,7 @@ def test_pdf_with_name_only():
3434 """
3535 with open ('tests/data/assets/ndjson/pdf_import_name_only.json' , 'r' ) as f :
3636 data = json .load (f )
37- res = NDJsonConverter .deserialize (data ). as_list ( )
37+ res = list ( NDJsonConverter .deserialize (data ))
3838 res = list (NDJsonConverter .serialize (res ))
3939 assert [round_dict (x ) for x in res ] == [round_dict (x ) for x in data ]
4040 f .close ()
You can’t perform that action at this time.
0 commit comments