From 3e981f759d14280fe1836630ef3fb74ba259c481 Mon Sep 17 00:00:00 2001 From: HomieOmie Date: Sat, 6 May 2023 00:43:40 -0400 Subject: [PATCH] Permanently added pytest-cov in pyproject.toml file to generate coverage reports --- pyproject.toml | 4 ++-- testing/examples/my_test.py | 6 ++++++ tox.ini | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 testing/examples/my_test.py diff --git a/pyproject.toml b/pyproject.toml index a4139a5c0..22239743d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,13 +10,13 @@ build-backend = "setuptools.build_meta" write_to = "src/_pytest/_version.py" [tool.pytest.ini_options] -minversion = "2.0" +minversion = "0.1.dev14953+gfd6a450" addopts = "-rfEX -p pytester --strict-markers" python_files = ["test_*.py", "*_test.py", "testing/python/*.py"] python_classes = ["Test", "Acceptance"] python_functions = ["test"] # NOTE: "doc" is not included here, but gets tested explicitly via "doctesting". -testpaths = ["testing"] +testpaths = ["testing/examples/my_test.py"] norecursedirs = ["testing/example_scripts"] xfail_strict = true filterwarnings = [ diff --git a/testing/examples/my_test.py b/testing/examples/my_test.py new file mode 100644 index 000000000..4cd697be7 --- /dev/null +++ b/testing/examples/my_test.py @@ -0,0 +1,6 @@ +def test_(): + m = [ + "This is some dummy test which shows the strange way in which Pycharm" + " displays the full diff." + ] + assert m == [] diff --git a/tox.ini b/tox.ini index 88ae16dea..05711b02f 100644 --- a/tox.ini +++ b/tox.ini @@ -65,6 +65,7 @@ deps = xdist: pytest-xdist>=2.1.0 xdist: -e . {env:_PYTEST_TOX_EXTRA_DEP:} + pytest-cov [testenv:linting] skip_install = True