Closed drj11 closed 3 years ago
Happy to pick this up, assuming you're happy with the fact that my python testing knowledge is currently somewhat slim.
I've assigned you. I would try pytest
if you don't have any other favourite testing frameworks.
Starting with pytest 6.1.1, structure /tests/test_ingest.py
and the test suggested.
Options to get this more suitable to run the kind of test suggested include:
test_<new_method>()
test_main()
I'm running with 1 for now (returning things from main seems shifty), suggest alternatives if any of the above sounds suspect.
yes, approach 1 sounds good for now. Do feel free to create a PR early on and mark it as draft or WIP (Work In Progress).
Since the description is no longer technically true, closing in favour of #25
at least one test would be to take a snapshot copy of the webpage, and then run the ingest code over it, and comparing the results against a known-good exemplar.
To start with this would involve refactoring the existing code a bit, so that it doesn't just
print()
its result.