2121 parse_html_to_ontology ,
2222)
2323from unstructured .partition .json import partition_json
24- from unstructured .staging .base import elements_from_json , elements_to_json
24+ from unstructured .staging .base import elements_from_json
2525
2626
2727def test_page_number_is_passed_correctly ():
@@ -179,12 +179,12 @@ def test_parsed_ontology_can_be_serialized_from_json(json_file_path):
179179@pytest .mark .parametrize (
180180 ("html_file_path" , "json_file_path" ),
181181 [
182- # ("html_files/example.html", "unstructured_json_output/example.json"),
182+ ("html_files/example.html" , "unstructured_json_output/example.json" ),
183183 ("html_files/example_full_doc.html" , "unstructured_json_output/example_full_doc.json" ),
184- # (
185- # "html_files/example_with_inline_fields.html",
186- # "unstructured_json_output/example_with_inline_fields.json",
187- # ),
184+ (
185+ "html_files/example_with_inline_fields.html" ,
186+ "unstructured_json_output/example_with_inline_fields.json" ,
187+ ),
188188 ],
189189)
190190def test_parsed_ontology_can_be_serialized_from_html (html_file_path , json_file_path ):
@@ -197,7 +197,6 @@ def test_parsed_ontology_can_be_serialized_from_html(html_file_path, json_file_p
197197 predicted_elements = partition_html (
198198 text = html_code , html_parser_version = "v2" , unique_element_ids = True
199199 )
200- elements_to_json (predicted_elements , "test.json" )
201200 assert len (expected_json_elements ) == len (predicted_elements )
202201
203202 for i in range (len (expected_json_elements )):
0 commit comments