File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -304,9 +304,12 @@ def __get_user_metadata(annotation):
304304 logger .warning (
305305 "No annotations found in project export root %s" , project_root
306306 )
307- type_postfix = "___objects.json" if len (
308- list (Path (project_root ).rglob ("*___objects.json" ))
309- ) > 0 else "___pixel.json"
307+ if len (list (Path (project_root ).rglob ("*___objects.json" ))) > 0 :
308+ type_postfix = "___objects.json"
309+ logger .info ("Found Vector project" )
310+ else :
311+ type_postfix = "___pixel.json"
312+ logger .info ("Found Pixel project" )
310313 for annotation_path in annotations_paths :
311314 annotation_json = json .load (open (annotation_path ))
312315 parts = annotation_path .name .split (type_postfix )
Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ def test_cli_image_upload_project_export(tmpdir):
8888 shell = True
8989 )
9090
91- assert len (list (test_dir3 .glob ("*.json" ))) == 1
91+ assert len (list (test_dir3 .glob ("*.json" ))) == 0
9292 assert len (list (test_dir3 .glob ("*.jpg" ))) == 0
9393 assert len (list (test_dir3 .glob ("*.png" ))) == 0
94+
95+ assert len (list ((test_dir3 / "folder1" ).glob ("*.json" ))) == 1
96+ assert len (list ((test_dir3 / "folder1" ).glob ("*.jpg" ))) == 0
97+ assert len (list ((test_dir3 / "folder1" ).glob ("*.png" ))) == 0
You can’t perform that action at this time.
0 commit comments