Skip to content

Commit

Permalink
Merge pull request #663 from oduwsdl/issue-283-test
Browse files Browse the repository at this point in the history
Add test to show breakage using variable len WARC-Dates for #283
  • Loading branch information
machawk1 authored Jun 22, 2020
2 parents 4d46061 + 7a9d823 commit 60de785
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.normpath(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 60de785

Please # to comment.