Closed mattjshannon closed 6 years ago
The coverage report generated by Travis does not only include the coverage of pypahdb, but also of pytest and all its dependencies. Adding --source pypahdb to the coverage command fixes this. [update] It looks like the coverage is the same, but Travis is quicker in generating the number.
Apparently we can consolidate our fixtures and place them in conftest.py
, which will make them available (automatically) to all of the test_*.py
files. Neat!
Refs: https://stackoverflow.com/questions/34466027/in-py-test-what-is-the-use-of-conftest-py-files https://docs.pytest.org/en/latest/fixture.html#conftest-py-sharing-fixture-functions
Currently the tests are making use of unittests, which does not work well with pytests' fixtures. Since unittests uses classes, commonality between tests can be captured in class properties.
Test coverage is now above 80%, which should be sufficient for know.
Unit tests need some TLC, particularly the
decomposer.py
anddecomposer_base.py
modules.