Skip to content

Commit

Permalink
Add test to show breakage using variable len WARC-Dates for #283
Browse files Browse the repository at this point in the history
  • Loading branch information
machawk1 committed Jun 20, 2020
1 parent 73f136f commit 771bbdb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,14 @@ def test_warc_ipwbIndexerBrokenWARCRecord():
assert ipwbTest.countCDXJEntries(cdxj) == 1


# WARC/1.1 allows for dates of length that are not easily converted
# to 14-digits. This test highlights the failures from a WARC
# exhibiting these dates.
@pytest.mark.ipwbIndexerVariableSizedDates
def test_warc_ipwbIndexerVariableSizedDates():
pathOfBrokenWARC = os.path.join(
os.path.dirname(__file__) +
'/../samples/warcs/variableSizedDates.warc')
indexer.indexFileAt(pathOfBrokenWARC, quiet=True)

# TODO: Have unit tests for each function in indexer.py

0 comments on commit 771bbdb

Please sign in to comment.