File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,20 @@ def test_lazy_parse_simple_annotation_zip_by_task(self):
114
114
assert len ([e for e in parser_list if e .input_data_id == "c86205d1-bdd4-4110-ae46-194e661d622b" ]) == 1
115
115
116
116
117
+ def test_lazy_parse_simple_annotation_dir_by_task (self ):
118
+ zip_path = Path (test_dir / "simple-annotation-v2" )
119
+ task_parser_list = list (annofabapi .parser .lazy_parse_simple_annotation_dir_by_task (zip_path ))
120
+
121
+ assert len (task_parser_list ) == 2
122
+ assert len ([e for e in task_parser_list if e .task_id == "sample_1" ]) == 1
123
+ assert len ([e for e in task_parser_list if e .task_id == "sample_0" ]) == 1
124
+
125
+ task_parser = [e for e in task_parser_list if e .task_id == "sample_1" ][0 ]
126
+ parser_list = task_parser .parser_list
127
+ assert len (parser_list ) == 2
128
+ assert len ([e for e in parser_list if e .input_data_id == "c6e1c2ec-6c7c-41c6-9639-4244c2ed2839" ]) == 1
129
+ assert len ([e for e in parser_list if e .input_data_id == "c86205d1-bdd4-4110-ae46-194e661d622b" ]) == 1
130
+
117
131
class TestFullAnnotation :
118
132
def test_full_annotation_zip (self ):
119
133
zip_path = Path (test_dir / "full-annotation.zip" )
You can’t perform that action at this time.
0 commit comments