From 3c370d02abfef334e8c7da95371322c27cc8769a Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 22 Sep 2021 15:17:00 -0700 Subject: [PATCH] pyproject.toml: Merge contents of .converagerc Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- .coveragerc | 9 --------- .gitlab-ci.yml | 2 +- debian/tests/control | 2 +- pyproject.toml | 8 ++++++++ 4 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 00a764af8..000000000 --- a/.coveragerc +++ /dev/null @@ -1,9 +0,0 @@ -# .coveragerc -- specifies execution options for coverage.py - -[run] -branch = True -omit = */tests/* - -[report] -precision = 2 -omit = */tests/* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a22e93d80..ae7020554 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ unit-tests: - echo "tester:password" | chpasswd - cp -r . /home/tester/plinth - chown -R tester:tester /home/tester/plinth - - su -c "cd ~/plinth;PYTHONPATH='.' py.test-3 --cov=plinth --cov-report=html:/home/tester/plinth/htmlcov --cov-config=.coveragerc --cov-report=term" tester + - su -c "cd ~/plinth;PYTHONPATH='.' py.test-3 --cov=plinth --cov-report=html:/home/tester/plinth/htmlcov --cov-report=term" tester - cp -r /home/tester/plinth/htmlcov test-coverage-report coverage: '/^TOTAL\s+.*\s+(\d+\.\d+%)$/' artifacts: diff --git a/debian/tests/control b/debian/tests/control index e519f8de9..810fa0c93 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -13,5 +13,5 @@ Restrictions: needs-root # # Run unit and integration tests on installed files. # -Test-Command: PYTHONPATH='/usr/lib/python3/dist-packages/plinth/' py.test-3 -p no:cacheprovider --cov=plinth --cov-report=html:debci/htmlcov --cov-config=.coveragerc --cov-report=term +Test-Command: PYTHONPATH='/usr/lib/python3/dist-packages/plinth/' py.test-3 -p no:cacheprovider --cov=plinth --cov-report=html:debci/htmlcov --cov-report=term Depends: git, python3-pytest, python3-pytest-cov, python3-pytest-django, @ diff --git a/pyproject.toml b/pyproject.toml index d337f151f..01d3dfd8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,14 @@ [tool.isort] known_first_party = ["plinth"] +[tool.coverage.run] +branch = true +omit = ["*/tests/*"] + +[tool.coverage.report] +precision = 2 +omit = ["*/tests/*"] + [tool.pytest.ini_options] addopts = "--ds=plinth.tests.data.django_test_settings" markers = [