@@ -1193,10 +1193,11 @@ def test_validate_video_invalid_instace_without_type_and_attr_annotation(self):
11931193 '''
11941194 )
11951195
1196+
11961197 with catch_prints () as out :
11971198 sa .validate_annotations ("Video" , os .path .join (self .vector_folder_path ,
11981199 f"{ tmpdir_name } /test_validate_video_invalid_instace_without_type_and_attr_annotation.json" ))
1199- self .assertIn ("instances[2].typemeta.fieldrequired " , out .getvalue ().strip ().replace (" " , "" ))
1200+ self .assertIn ("instances[2].meta.typefieldrequired " , out .getvalue ().strip ().replace (" " , "" ))
12001201
12011202 def test_validate_vector_temlpate_polygon_polyline_min_annotation (self ):
12021203 with tempfile .TemporaryDirectory () as tmpdir_name :
@@ -1933,7 +1934,8 @@ def test_validate_video_point_labels_bad_keys(self):
19331934 "classId": 859496,
19341935 "className": "vid",
19351936 "start": 5528212,
1936- "end": 7083022
1937+ "end": 7083022,
1938+ "pointLabels": {}
19371939 },
19381940 "parameters": [
19391941 {
@@ -1969,6 +1971,48 @@ def test_validate_video_point_labels_bad_keys(self):
19691971 ]
19701972 }
19711973 ]
1974+ },
1975+ {
1976+ "parameters": [
1977+ {
1978+ "start": 5528212,
1979+ "end": 7083022,
1980+ "timestamps": [
1981+ {
1982+ "timestamp": 5528212,
1983+ "attributes": []
1984+ },
1985+ {
1986+ "timestamp": 6702957,
1987+ "attributes": [
1988+ {
1989+ "id": 1175876,
1990+ "groupId": 338357,
1991+ "name": "attr",
1992+ "groupName": "attr g"
1993+ }
1994+ ]
1995+ },
1996+ {
1997+ "timestamp": "7083022",
1998+ "attributes": [
1999+ {
2000+ "id": 1175876,
2001+ "groupId": 338357,
2002+ "name": "attr",
2003+ "groupName": "attr g"
2004+ }
2005+ ]
2006+ }
2007+ ]
2008+ }
2009+ ]
2010+ },
2011+ {
2012+ "meta": "afsdfadsf"
2013+ },
2014+ {
2015+ "meta" : []
19722016 }
19732017 ],
19742018 "tags": [
@@ -1982,5 +2026,5 @@ def test_validate_video_point_labels_bad_keys(self):
19822026 sa .validate_annotations ("Video" , os .path .join (self .vector_folder_path ,
19832027 f"{ tmpdir_name } /test_validate_video_point_labels_bad_keys.json" ))
19842028 self .assertEqual (
1985- "instances[0].meta.pointLabels.bad_key_1doesnotmatchexpectedformat^[0-9]*$\n instances[0].meta.pointLabels.bad_key_2doesnotmatchexpectedformat^[0-9]*$\n instances[0].meta.pointLabels.doesnotmatchexpectedformat^[0-9]*$\n instances[0].meta.pointLabels.1strtypeexpected\n instances[2].parameters[0].timestamps[2].timestampintegertypeexpected\n tags[0]strtypeexpected" ,
2029+ "instances[0].meta.pointLabels.bad_key_1doesnotmatchexpectedformat^[0-9]*$\n instances[0].meta.pointLabels.bad_key_2doesnotmatchexpectedformat^[0-9]*$\n instances[0].meta.pointLabels.doesnotmatchexpectedformat^[0-9]*$\n instances[0].meta.pointLabels.1strtypeexpected\n instances[2].meta.pointLabelsextrafieldsnotpermitted \n instances[2]. parameters[0].timestamps[2].timestampintegertypeexpected\n instances[3].metafieldrequired \n instances[4].metavalueisnotavaliddict \n instances[5].metavalueisnotavaliddict \n tags[0]strtypeexpected" ,
19862030 out .getvalue ().strip ().replace (" " , "" ))
0 commit comments