test: Add tests for readera extractor
This commit is contained in:
parent
e46219151b
commit
764b3204a1
3 changed files with 94 additions and 0 deletions
24
tests/extractors/test_readera.py
Normal file
24
tests/extractors/test_readera.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from pathlib import Path
|
||||
|
||||
from papis_extract.extractors.readera import ReadEraExtractor
|
||||
|
||||
valid_file = Path("tests/resources/ReadEra_sample.txt")
|
||||
invalid_file = Path("tests/resources/Readest_sample.txt")
|
||||
|
||||
|
||||
def test_identifies_readera_exports():
|
||||
ex = ReadEraExtractor()
|
||||
assert ex.can_process(valid_file)
|
||||
|
||||
|
||||
# Readest exports are very similar so we should ensure it ignores them
|
||||
def test_ignores_readest_exports():
|
||||
ex = ReadEraExtractor()
|
||||
assert not ex.can_process(invalid_file)
|
||||
|
||||
|
||||
def test_entry_extractions():
|
||||
ex = ReadEraExtractor()
|
||||
result = ex.run(valid_file)
|
||||
print(result)
|
||||
assert False
|
||||
Loading…
Add table
Add a link
Reference in a new issue