File tree Expand file tree Collapse file tree 5 files changed +18
-8
lines changed
src/superannotate/lib/core Expand file tree Collapse file tree 5 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 22minversion = 3.0
33log_cli =true
44python_files = test_*.py
5- ; addopts = -n32 --dist=loadscope
5+ addopts = -n32 --dist =loadscope
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ def get_value(cls, name):
2323 if enum .name .lower () == name .lower ():
2424 return enum .value
2525
26+ @classmethod
27+ def values (cls ):
28+ return [enum .name .lower () for enum in list (cls )]
29+
2630
2731class ProjectType (BaseTitledEnum ):
2832 VECTOR = "Vector" , 1
Original file line number Diff line number Diff line change @@ -4301,6 +4301,10 @@ def exclude_file_patterns(self):
43014301 return constances .DEFAULT_FILE_EXCLUDE_PATTERNS
43024302 return self ._exclude_file_patterns
43034303
4304+ def validate_annotation_status (self ):
4305+ if self ._annotation_status and self ._annotation_status not in constances .AnnotationStatus .values ():
4306+ raise AppValidationException ("Invalid annotations status" )
4307+
43044308 def validate_extensions (self ):
43054309 if self ._extensions and not all (
43064310 [extension in constances .DEFAULT_IMAGE_EXTENSIONS for extension in self ._extensions ]
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ def classes_json(self):
2626 "data_set/sample_project_vector/classes/classes.json" ,
2727 )
2828
29- # @pytest.mark.skip(
30- # "waiting for deployment to dev",
31- # )
29+ @pytest .mark .skip (
30+ "waiting for deployment to dev" ,
31+ )
3232 def test_delete_annotations (self ):
3333 sa .upload_images_from_folder_to_project (
3434 self .PROJECT_NAME , self .folder_path , annotation_status = "InProgress"
@@ -46,9 +46,9 @@ def test_delete_annotations(self):
4646 self .assertIsNotNone (data ["annotation_json_filename" ])
4747 self .assertIsNone (data ["annotation_mask" ])
4848
49- # @pytest.mark.skip(
50- # "waiting for deployment to dev",
51- # )
49+ @pytest .mark .skip (
50+ "waiting for deployment to dev" ,
51+ )
5252 def test_delete_annotations_by_not_existing_name (self ):
5353 sa .upload_images_from_folder_to_project (
5454 self .PROJECT_NAME , self .folder_path , annotation_status = "InProgress"
Original file line number Diff line number Diff line change 4545# print(results)
4646# print(sum(results)/9)
4747
48- print (sa .search_images ("Vector/for sdk" ))
48+ from src .superannotate .lib .core .enums import AnnotationStatus
49+
50+ pass
You can’t perform that action at this time.
0 commit comments