Skip to content

Commit

Permalink
Add a test that demonstrates HazyResearch#489
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiromu Hota committed Jul 30, 2020
1 parent 1d6771b commit a7ecaf9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,13 @@ def do_nothing_matcher(fig):
)

candidate_extractor.apply(docs, split=0, parallelism=PARALLEL)


def test_parse_error_doc_skipping():
"""Test skipping of faulty htmls."""
faulty_doc_path = "tests/data/html_faulty/ext_diseases_missing_table_tag.html"
preprocessor = HTMLDocPreprocessor(faulty_doc_path)
session = Meta.init(CONN_STRING).Session()
corpus_parser = Parser(session)
corpus_parser.apply(preprocessor)
assert session.query(Document).count() == 0

0 comments on commit a7ecaf9

Please sign in to comment.