Closed sarnold closed 3 years ago
What are your thoughts on the "best" way forward for test cleanup? I fixed(?) the first error from "outside tests dir" (see the pickle error commit) but I'm not sure if that's the best path forward (or even what to do with the re.compile errors). Thanks!
I would be in favor of having all tests run by pytest.
The test failures are due to the doctests setting the fallback level to "exception" (i.e., raise exception if RE2 cannot handle the expression). I'll add a workaround by re-setting the fallback level to the default.
For the various repackaging efforts (pep517, cmake, etc) the legacy test driver in setup.py got removed, mainly because all the current "best practice" guidance says "use a test runner like pytest or xxx" instead of through setup.py and I started running tests via nose or python unittest. I think the main issue left is the legacy tests were written to run from the
tests
subdirectory instead of the top-level project dir.What works:
BUT the python doctest module has no discovery and needs to be run from the
tests
dir.will run tests on the
*.txt
targets and then the same tests asunittest discover
but does not run/show the doctests found bypython -m doctest
when run in the tests directory.will find all the working tests, however, using pytest/nosetests to discover any actual tests from the top-level project directory fails on several tests:
Oddly, pytest can run doctests with an ignore: