File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 44
55from luxonis_ml .data import LabelType , LuxonisLoader , LuxonisParser
66from luxonis_ml .enums import DatasetType
7+ from luxonis_ml .utils import environ
78
89URL_PREFIX : Final [str ] = "gs://luxonis-test-bucket/luxonis-ml-test-data"
910WORK_DIR : Final [str ] = "tests/data/parser_datasets"
@@ -82,13 +83,24 @@ def prepare_dir():
8283 "D1_ParkingSlot-solo.zip" ,
8384 [LabelType .BOUNDINGBOX , LabelType .SEGMENTATION ],
8485 ),
86+ (
87+ DatasetType .COCO ,
88+ "roboflow://team-roboflow/coco-128/2/coco" ,
89+ [LabelType .BOUNDINGBOX , LabelType .CLASSIFICATION ],
90+ ),
8591 ],
8692)
8793def test_dir_parser (
8894 dataset_type : DatasetType , url : str , expected_label_types : List [LabelType ]
8995):
96+ if not url .startswith ("roboflow://" ):
97+ url = f"{ URL_PREFIX } /{ url } "
98+
99+ elif environ .ROBOFLOW_API_KEY is None :
100+ pytest .skip ("Roboflow API key is not set" )
101+
90102 parser = LuxonisParser (
91- f" { URL_PREFIX } / { url } " ,
103+ url ,
92104 dataset_name = f"test-{ dataset_type } " ,
93105 delete_existing = True ,
94106 save_dir = WORK_DIR ,
You can’t perform that action at this time.
0 commit comments