From 8506fd43770661cdcf92c5cac2356cba74778834 Mon Sep 17 00:00:00 2001 From: Tristan Lee Date: Wed, 2 Mar 2022 09:49:08 -0600 Subject: [PATCH] added empty __init__.py file so that coverage is correctly computed --- tests/__init__.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..f85365c --- /dev/null +++ b/tests/__init__.py @@ -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. + +""" + +#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# \ No newline at end of file