diff --git a/tests/unit_tests.py b/tests/unit_tests.py index 6487ac60..db88158c 100644 --- a/tests/unit_tests.py +++ b/tests/unit_tests.py @@ -1038,13 +1038,21 @@ def test_table_processing(): """) - processed_table = handle_table(table_with_list, TAG_CATALOG, options) + processed_table = handle_table(copy(table_with_list), TAG_CATALOG, options) result = [ (el.tag, el.text) if el.text is not None and el.text.strip() else el.tag for el in processed_table.iter() ] - # assert result == ["table", "row", "cell", ("p", "a list"), "list", ("item", "one"), ("item", "two"),] assert result == ['table', 'row', 'cell', ('p', 'a list'), 'list'] + + options.recall = True + processed_table = handle_table(copy(table_with_list), TAG_CATALOG, options) + result = [ + (el.tag, el.text) if el.text is not None and el.text.strip() else el.tag + for el in processed_table.iter() + ] + assert result == ["table", "row", "cell", ("p", "a list"), 'list', ("item", "one"), ("item", "two"),] + broken_table = html.fromstring("
cell1 |
cell2 |