added empty __init__.py file so that coverage is correctly computed

This commit is contained in:
Tristan Lee
2022-03-02 09:49:08 -06:00
parent 8dc9a9b28e
commit 8506fd4377

24
tests/__init__.py Normal file
View File

@@ -0,0 +1,24 @@
# -*- coding: UTF-8 -*-
"""This file seems to be necessary for `pytest-cov` to correctly compute code
coverage, when the tests are run from the project root directory with the
command:
$ pytest
Though this file does not seem to be necessary when running the tests with the
command:
$ python -m pytest
This seems to be a known issue with the `pytest` and `coverage` packages:
* https://github.com/pytest-dev/pytest-cov/issues/401
* https://stackoverflow.com/q/47287721/13026442
There's probably a clever way to fix this using `pytest.ini` or `.coveragerc`
files, but until I figure that out, this will have to do.
"""
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#