diff --git a/python/.coverage b/python/.coverage new file mode 100644 index 00000000..d28b75a6 Binary files /dev/null and b/python/.coverage differ diff --git a/python/.gitignore b/python/.gitignore index baf8bcc7..708aac3c 100644 --- a/python/.gitignore +++ b/python/.gitignore @@ -10,3 +10,4 @@ venv/ dist/* *.pickle .s.yml +.DS_Store \ No newline at end of file diff --git a/python/.tox/py310/.tox-info.json b/python/.tox/py310/.tox-info.json new file mode 100644 index 00000000..95d22f49 --- /dev/null +++ b/python/.tox/py310/.tox-info.json @@ -0,0 +1,6 @@ +{ + "ToxEnv": { + "name": "py310", + "type": "VirtualEnvRunner" + } +} \ No newline at end of file diff --git a/python/.tox/py37/.tox-info.json b/python/.tox/py37/.tox-info.json new file mode 100644 index 00000000..06f07fc6 --- /dev/null +++ b/python/.tox/py37/.tox-info.json @@ -0,0 +1,6 @@ +{ + "ToxEnv": { + "name": "py37", + "type": "VirtualEnvRunner" + } +} \ No newline at end of file diff --git a/python/.tox/py38/.tox-info.json b/python/.tox/py38/.tox-info.json new file mode 100644 index 00000000..cbc8b643 --- /dev/null +++ b/python/.tox/py38/.tox-info.json @@ -0,0 +1,6 @@ +{ + "ToxEnv": { + "name": "py38", + "type": "VirtualEnvRunner" + } +} \ No newline at end of file diff --git a/python/da b/python/da new file mode 100755 index 00000000..087a903d Binary files /dev/null and b/python/da differ diff --git a/python/pytest.ini b/python/pytest.ini index 01dc0b85..f20ad699 100644 --- a/python/pytest.ini +++ b/python/pytest.ini @@ -7,4 +7,17 @@ filterwarnings = markers = smoketest slow + already # added new marker +[coverage:run] +source = python +omit = + */tests/* + */venv/* + */__init__.py +[coverage:report] +# Setting the report format +show_missing= True # Show missing lines in the report +skip_covered = True # Skip files that are fully covered + +pytest --cov=python tests/ --cov-report html \ No newline at end of file diff --git a/python/tests/utils.py b/python/tests/utils.py index e6823e6a..1b690e0a 100644 --- a/python/tests/utils.py +++ b/python/tests/utils.py @@ -16,7 +16,7 @@ import string from pathlib import Path from typing import List - + def get_tests_data_dir() -> Path: repo_root_dir = Path(__file__).parent.parent diff --git a/python/tox.ini b/python/tox.ini new file mode 100644 index 00000000..b37bcceb --- /dev/null +++ b/python/tox.ini @@ -0,0 +1,21 @@ +[tox] +envlist = py311, coverage + +[testenv] +basepython = python3.11 +deps = + pytest + coverage +commands = + python -m coverage run -m pytest + python -m coverage report -m --skip-covered + python -m coverage html # Generate HTML coverage report + +[testenv:coverage] +basepython = python3.11 +deps = coverage +commands = + python -m coverage combine + python -m coverage report -m + python -m coverage html # Generate HTML report + python -m coverage json # Generate JSON