diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-11-15 23:10:11 +0000 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-13 20:19:11 +0000 |
commit | 4deb664c5df9f0dd64769777e85f3c76f2caae9b (patch) | |
tree | e5f17b5d9b3ede37c4196d1a66b9d1ab5dc5ebce /gnu/packages/check.scm | |
parent | b6f774e55053aff30adab9ac52c54e10e987fdea (diff) |
gnu: python-coverage: Update to 7.6.7.
* gnu/packages/check.scm (python-coverage): Update to 7.6.7.
[build-system]: Swap to pyproject-build-system.
[arguments]<tests>: Enable them. <test-flags>: Skip some failing
tests. <phases>: Add patch-pyproject, fix-conftest.
[native-inputs]: Add python-pytest, python-pytest-xdist, python-flaky,
python-setuptools, and python-wheel.
Change-Id: Ib69fbec45876f5f13e0e925c7768cef8fd6eb52c
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r-- | gnu/packages/check.scm | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index a320546a06..5c32b68af4 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -2411,18 +2411,55 @@ have failed since the last commit or what tests are currently failing."))) (define-public python-coverage (package (name "python-coverage") - (version "6.4.3") + (version "7.6.7") (source (origin (method url-fetch) (uri (pypi-uri "coverage" version)) (sha256 (base32 - "157vndwrzyv9ypn2w3b6g8gv7vw07v994hq8nxasdb75k3ry2apc")))) - (build-system python-build-system) + "094x8fsqfp7blrz3wh823p5vvzdrri5mw17z32hwjh8lwhk4i7fp")))) + (build-system pyproject-build-system) (arguments - ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors. - '(#:tests? #f)) + (list + #:test-flags + #~(list "--numprocesses=auto" + ;; XXX: Tests fail for multiple assertion reasons or missing + ;; fake modules. + "--ignore=tests/test_venv.py" + "--ignore=tests/test_report.py" + "--ignore=tests/test_plugins.py" + "--ignore=tests/test_debug.py" + "--ignore=tests/test_xml.py" + "--ignore=tests/test_python.py" + "--ignore=tests/test_concurrency.py" + "--ignore=tests/test_process.py" + "--deselect=tests/test_annotate.py::AnnotationGoldTest::test_multi" + "--deselect=tests/test_cmdline.py::CmdLineStdoutTest::test_version" + "--deselect=tests/test_api.py::RelativePathTest::test_files_up_one_level" + "--deselect=tests/test_filereporter.py::FileReporterTest::test_zipfile" + "--deselect=tests/test_oddball.py::DoctestTest::test_doctest") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-pyproject + (lambda _ + (substitute* "pyproject.toml" + ;; Just run pytest with no frills. + (("addopts.*") "")))) + (add-before 'check 'fix-conftest + ;; It tries to scan the whole sys.path and "find some place to + ;; write to". + (lambda _ + (with-output-to-file (string-append (getcwd) "/test.pth") + (lambda _ (display ""))) + (substitute* "tests/conftest.py" + (("map(Path, sys.path)") (format #f "[~s]" (getcwd))))))))) + (native-inputs + (list python-pytest + python-pytest-xdist ; hardcoded in tests/conftests.py + python-flaky + python-setuptools + python-wheel)) (propagated-inputs (list python-tomli)) (home-page "https://coverage.readthedocs.io") |