File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
tests/data/serialization/ndjson Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1- import inspect
21import json
32from labelbox .data .serialization .ndjson .classification import NDRadio
43
Original file line number Diff line number Diff line change @@ -29,8 +29,10 @@ def test_image():
2929 r .pop ('classifications' , None )
3030 assert [round_dict (x ) for x in res ] == [round_dict (x ) for x in data ]
3131
32+
3233def test_image_with_name_only ():
33- with open ('tests/data/assets/ndjson/image_import_name_only.json' , 'r' ) as file :
34+ with open ('tests/data/assets/ndjson/image_import_name_only.json' ,
35+ 'r' ) as file :
3436 data = json .load (file )
3537
3638 res = NDJsonConverter .deserialize (data ).as_list ()
Original file line number Diff line number Diff line change @@ -10,8 +10,10 @@ def test_nested():
1010 res = list (NDJsonConverter .serialize (res ))
1111 assert res == data
1212
13+
1314def test_nested_name_only ():
14- with open ('tests/data/assets/ndjson/nested_import_name_only.json' , 'r' ) as file :
15+ with open ('tests/data/assets/ndjson/nested_import_name_only.json' ,
16+ 'r' ) as file :
1517 data = json .load (file )
1618 res = NDJsonConverter .deserialize (data ).as_list ()
1719 res = list (NDJsonConverter .serialize (res ))
You can’t perform that action at this time.
0 commit comments