mirror of
https://github.com/bellingcat/polyphemus.git
synced 2026-06-08 03:18:32 +03:00
added empty __init__.py file so that coverage is correctly computed
This commit is contained in:
24
tests/__init__.py
Normal file
24
tests/__init__.py
Normal 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.
|
||||
|
||||
"""
|
||||
|
||||
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
|
||||
Reference in New Issue
Block a user