diff options
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r-- | gnu/packages/check.scm | 271 |
1 files changed, 106 insertions, 165 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index a02f4621ac..794a3f4c22 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -90,6 +90,7 @@ #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (guix build-system trivial) + #:use-module (guix deprecation) #:use-module (srfi srfi-1)) (define-public pict @@ -724,7 +725,7 @@ test coverage and has a web user interface that will refresh automatically.") (define-public googletest (package (name "googletest") - (version "1.11.0") + (version "1.12.1") (source (origin (method git-fetch) @@ -733,7 +734,7 @@ test coverage and has a web user interface that will refresh automatically.") (commit (string-append "release-" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0pd4y1gpx1z8fiyarkvqlmk6hbv0lc8fr00ivnsvqzi1xg34jfaa")))) + (base32 "1cv55x3amwrvfan9pr8dfnicwr8r6ar3yf6cg9v6nykd6m2v3qsv")))) (build-system cmake-build-system) (arguments `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) @@ -813,13 +814,13 @@ but it works for any C/C++ project.") (define-public python-parameterized (package (name "python-parameterized") - (version "0.7.4") + (version "0.8.1") (source (origin (method url-fetch) (uri (pypi-uri "parameterized" version)) (sha256 - (base32 "1444fdz5bj0k10nmhxv0bv2gfrfisi7hfzqdndb0pvhf4g3qq3qr")))) + (base32 "0p1vhfw552rgd7gb2vy4l4l4k8mnbdz7f3chgzvk0r0qsqvzzfs1")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -974,57 +975,54 @@ standard library.") (define-public python-pytest (package (name "python-pytest") - (version "6.2.5") + (version "7.1.3") (source (origin (method url-fetch) (uri (pypi-uri "pytest" version)) (sha256 (base32 - "12cyi0lnyaq8sdqfnqlppd76gkw6zcg10gyih5knx9v611l3c6qk")))) + "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg")))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'build 'pretend-version - ;; The version string is usually derived via setuptools-scm, but - ;; without the git metadata available, the version string is set to - ;; '0.0.0'. - (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version))) - (replace 'check - (lambda* (#:key (tests? #t) #:allow-other-keys) - (setenv "TERM" "dumb") ;attempt disabling markup tests - (if tests? - (invoke "pytest" "-vv" "-k" - (string-append - ;; This test involves the /usr directory, and fails. - " not test_argcomplete" - ;; These test do not honor the isatty detection and - ;; fail. - " and not test_code_highlight" - " and not test_color_yes")) - (format #t "test suite not run~%"))))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'pretend-version + ;; The version string is usually derived via setuptools-scm, but + ;; without the git metadata available, the version string is set to + ;; '0.0.0'. + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" + #$(package-version this-package)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (setenv "TERM" "dumb") ;attempt disabling markup tests + (if tests? + (invoke "pytest" "-vv" "-k" + (string-append + ;; This test involves the /usr directory, and fails. + " not test_argcomplete" + ;; These test do not honor the isatty detection and + ;; fail. + " and not test_code_highlight" + " and not test_color_yes")) + (format #t "test suite not run~%"))))))) (propagated-inputs - `(("python-attrs" ,python-attrs-bootstrap) - ("python-iniconfig" ,python-iniconfig) - ("python-more-itertools" ,python-more-itertools) - ("python-packaging" ,python-packaging-bootstrap) - ("python-pluggy" ,python-pluggy) - ("python-py" ,python-py) - ("python-six" ,python-six-bootstrap) - ("python-toml" ,python-toml) - ("python-wcwidth" ,python-wcwidth))) + (list python-attrs-bootstrap + python-iniconfig + python-packaging-bootstrap + python-pluggy + python-py + python-tomli)) (native-inputs - `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`. - ("bash" ,bash) - ("python-hypothesis" ,python-hypothesis) - ("python-nose" ,python-nose) - ("python-mock" ,python-mock) - ("python-pytest" ,python-pytest-bootstrap) - ("python-setuptools-scm" ,python-setuptools-scm) - ("python-toml" ,python-toml) - ("python-xmlschema" ,python-xmlschema))) + ;; Tests need the "regular" bash since 'bash-final' lacks `compgen`. + (list bash + python-hypothesis + python-nose + python-pytest-bootstrap + python-setuptools-scm + python-xmlschema)) (home-page "https://docs.pytest.org/en/latest/") (synopsis "Python testing library") (description @@ -1033,14 +1031,15 @@ and functions, detailed info on failing assert statements, modular fixtures, and many external plugins.") (license license:expat))) -(define-public python-pytest-6 python-pytest) +(define-deprecated python-pytest-6 python-pytest) +(export python-pytest-6) (define-public python-pytest-bootstrap (package (inherit python-pytest) (name "python-pytest-bootstrap") (native-inputs (list python-iniconfig python-setuptools-scm - python-toml)) + python-tomli)) (arguments `(#:tests? #f)))) (define-public python-pytest-assume @@ -1211,28 +1210,39 @@ Python's @code{random.seed}.") (define-public python-pytest-runner (package (name "python-pytest-runner") - (version "5.2") + (version "6.0.0") (source (origin (method url-fetch) (uri (pypi-uri "pytest-runner" version)) (sha256 (base32 - "0awll1bva5zy8cspsxcpv7pjcrdf5c6pf56nqn4f74vvmlzfgiwn")))) + "11dnhxnjmh4nf1j8rnvx944ha3wg8ggrgrwdcx4c7d19xmi57n5l")))) (build-system python-build-system) (arguments - '(;; FIXME: The test suite requires 'python-flake8' and 'python-black', - ;; but that introduces a circular dependency. - #:tests? #f - #:phases (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (invoke "pytest" "-vv") - (format #t "test suite not run~%")) - #t))))) + (list + ;; FIXME: The test suite requires 'python-flake8' and 'python-black', + ;; but that introduces a circular dependency. + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (replace 'build + (lambda _ + (let ((circa-1980 (* 10 366 24 60 60))) + (setenv "SOURCE_DATE_EPOCH" (number->string circa-1980)) + (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))) + (replace 'install + (lambda _ + (let ((whl (car (find-files "dist" "\\.whl$")))) + (invoke "pip" "--no-cache-dir" "--no-input" + "install" "--no-deps" "--prefix" #$output whl)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "pytest" "-vv") + (format #t "test suite not run~%"))))))) (native-inputs - (list python-setuptools-scm)) + (list python-pypa-build python-setuptools-scm python-wheel)) (home-page "https://github.com/pytest-dev/pytest-runner") (synopsis "Invoke py.test as a distutils command") (description @@ -1270,13 +1280,13 @@ Python's @code{random.seed}.") (define-public python-pytest-mock (package (name "python-pytest-mock") - (version "3.6.1") + (version "3.8.2") (source (origin (method url-fetch) (uri (pypi-uri "pytest-mock" version)) (sha256 - (base32 "0qhfmd05z3g88bnwq6644jl6p5wy01i4yy7h8883z9jjih2pl8a0")) + (base32 "18pwr0qhr2z5rpfz7930986s55hh1gnmmq4m09q5h99rai2kzw3p")) (modules '((guix build utils))) (snippet ;; Some tests do a string match on Pytest output, and fails when @@ -1316,44 +1326,26 @@ same arguments.") (define-public python-pytest-xdist (package (name "python-pytest-xdist") - (version "2.1.0") + (version "2.5.0") (source (origin (method url-fetch) (uri (pypi-uri "pytest-xdist" version)) (sha256 (base32 - "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Remove pre-compiled .pyc files from source. - (for-each delete-file-recursively - (find-files "." "__pycache__" #:directories? #t)) - (for-each delete-file (find-files "." "\\.pyc$")) - #t)))) + "1psf5dqxvc38qzxvc305mkg5xpdmdkbkkfiyqlmdnkgh7z5dx025")))) (build-system python-build-system) (arguments - '(#:tests? #f ; Lots of tests fail. - #:phases + '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-setup-py - (lambda _ - ;; Relax pytest requirement. - (substitute* "setup.py" - (("pytest>=6\\.0\\.0") "pytest")))) (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (lambda* (#:key tests? #:allow-other-keys) (when tests? - (add-installed-pythonpath inputs outputs) (invoke "pytest" "-vv" "-n" (number->string (parallel-job-count))))))))) - (native-inputs - (list python-setuptools-scm)) - (propagated-inputs - (list python-execnet python-pytest python-py python-pytest-forked)) - (home-page - "https://github.com/pytest-dev/pytest-xdist") + (native-inputs (list python-setuptools-scm python-filelock python-pytest)) + (propagated-inputs (list python-execnet python-pytest-forked)) + (home-page "https://github.com/pytest-dev/pytest-xdist") (synopsis "Plugin for py.test with distributed testing and loop-on-failing modes") (description @@ -1365,31 +1357,17 @@ program code to a remote location, executes there, and then syncs the result back.") (license license:expat))) -(define-public python-pytest-xdist-next - (package/inherit python-pytest-xdist - (name "python-pytest-xdist") - (version "2.5.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pytest-xdist" version)) - (sha256 - (base32 - "1psf5dqxvc38qzxvc305mkg5xpdmdkbkkfiyqlmdnkgh7z5dx025")))) - (propagated-inputs (list python-execnet python-pytest - python-pytest-forked-next)))) - (define-public python-pytest-timeout (package (name "python-pytest-timeout") - (version "2.0.2") + (version "2.1.0") (source (origin (method url-fetch) (uri (pypi-uri "pytest-timeout" version)) (sha256 (base32 - "04l1cd2qyp3fbccw95a8nqg682r647v7yil8807dgs7xv9a8pyg6")))) + "1nf339zg6qam3681f72j9c8fbqk8qcilna92psmzh4n60isa0z60")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -1412,7 +1390,7 @@ timeout has been exceeded.") (define-public python-pytest-forked (package (name "python-pytest-forked") - (version "1.3.0") + (version "1.4.0") (source (origin (method git-fetch) ;for tests @@ -1422,29 +1400,24 @@ timeout has been exceeded.") (file-name (git-file-name name version)) (sha256 (base32 - "1aip4kx50ynvykl7kq2mlbsi82vx701dvb8mm64lhp69bbv105rc")))) + "0j9bbjny7h3b4fig6l26f26c697r67mm62fzdd9m9rqyy2bmnqjs")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'disable-setuptools-scm + (add-before 'build 'pretend-version (lambda _ - (substitute* "setup.py" - (("use_scm_version=True") - (format #f "version=~s" ,version)) - (("setup_requires=\\['setuptools_scm'\\],.*") - "")))) + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version))) (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (lambda* (#:key tests? #:allow-other-keys) (when tests? - (add-installed-pythonpath inputs outputs) (invoke "pytest" "-vv"))))))) (native-inputs ;; XXX: The bootstrap variant of Pytest is used to ensure the ;; 'hypothesis' plugin is not in the environment (due to ;; <http://issues.guix.gnu.org/25235>), which would cause the test suite ;; to fail (see: https://github.com/pytest-dev/pytest-forked/issues/54). - `(("python-pytest" ,python-pytest-bootstrap))) + (list python-pytest-bootstrap python-setuptools-scm)) (home-page "https://github.com/pytest-dev/pytest-forked") (synopsis "Pytest plugin to run tests in isolated forked subprocesses") (description "This package provides a Pytest plugin which enables running @@ -1453,23 +1426,6 @@ can be useful to isolate tests against undesirable global environment side-effects (such as setting environment variables).") (license license:expat))) -(define-public python-pytest-forked-next - (package - (inherit python-pytest-forked) - (name "python-pytest-forked") - (version "1.4.0") - (source - (origin - (method git-fetch) ;for tests - (uri (git-reference - (url "https://github.com/pytest-dev/pytest-forked") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0j9bbjny7h3b4fig6l26f26c697r67mm62fzdd9m9rqyy2bmnqjs")))) - (native-inputs (list python-pytest-bootstrap python-setuptools-scm)))) - (define-public python-scripttest (package (name "python-scripttest") @@ -1742,18 +1698,20 @@ have failed since the last commit or what tests are currently failing."))) (define-public python-coverage (package (name "python-coverage") - (version "5.2.1") + (version "6.4.3") (source (origin (method url-fetch) (uri (pypi-uri "coverage" version)) (sha256 (base32 - "16z8i18msgs8k74n73dj9x49wzkl0vk4vq8k5pl1bsj70y7b4k53")))) + "157vndwrzyv9ypn2w3b6g8gv7vw07v994hq8nxasdb75k3ry2apc")))) (build-system python-build-system) (arguments ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors. '(#:tests? #f)) + (propagated-inputs + (list python-tomli)) (home-page "https://coverage.readthedocs.io") (synopsis "Code coverage measurement for Python") (description @@ -2025,20 +1983,24 @@ instantly.") (define-public python-hypothesis (package (name "python-hypothesis") - (version "6.0.2") + (version "6.54.5") (source (origin (method url-fetch) (uri (pypi-uri "hypothesis" version)) (sha256 (base32 - "0wj7ip779naf2n076nylf2gi0sjz68z1ir9d9r2rgs7br18naqdf")))) + "1ivyrjpnahvj359pfndnk8x3h0gw37kqm02fmnzibx4mas15d44a")))) (build-system python-build-system) (arguments ;; XXX: Tests are not distributed with the PyPI archive. - '(#:tests? #f)) + (list #:tests? #f + #:phases + #~(modify-phases %standard-phases + ;; XXX: hypothesis requires pytest at runtime, but we can + ;; not propagate it due to a circular dependency. + (delete 'sanity-check)))) (propagated-inputs - `(("python-attrs" ,python-attrs-bootstrap) - ("python-sortedcontainers" ,python-sortedcontainers))) + (list python-attrs-bootstrap python-exceptiongroup python-sortedcontainers)) (synopsis "Library for property based testing") (description "Hypothesis is a library for testing your Python code against a much larger range of examples than you would ever want to write by hand. It’s @@ -2047,20 +2009,8 @@ seamlessly into your existing Python unit testing work flow.") (home-page "https://github.com/HypothesisWorks/hypothesis") (license license:mpl2.0))) -;;; TODO: Make the default python-hypothesis in the next rebuild cycle. -(define-public python-hypothesis-next - (package - (inherit python-hypothesis) - (version "6.43.3") - (source (origin - (method url-fetch) - (uri (pypi-uri "hypothesis" version)) - (sha256 - (base32 - "0d67dlc5a47i48fxzmji2mnybzby0h1wdscmj54555fghcyp1045")))) - (propagated-inputs - (modify-inputs (package-propagated-inputs python-hypothesis) - (append python-pytest))))) ;to satisfy the sanity-check phase +(define-deprecated python-hypothesis-next python-hypothesis) +(export python-hypothesis-next) (define-public python-hypothesmith (package @@ -2858,7 +2808,7 @@ portable to just about any platform.") (define-public libfaketime (package (name "libfaketime") - (version "0.9.9") + (version "0.9.10") (home-page "https://github.com/wolfcw/libfaketime") (source (origin (method git-fetch) @@ -2867,7 +2817,7 @@ portable to just about any platform.") (commit (string-append "v" version)))) (sha256 (base32 - "1gi1xciqga5hl2xlk7rc3j8wy47ag97pi7ngmdl6ny1d11b2wn1z")) + "112l7x2gv4f47hpffpb8djfwvgrs8w5h9s266h1fshi1c916x10d")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments @@ -3006,7 +2956,7 @@ grew out of the @dfn{Vc} project.") (define-public python-pyfakefs (package (name "python-pyfakefs") - (version "3.7.1") + (version "4.6.3") (source (origin (method url-fetch) ;; We use the PyPI URL because there is no proper release @@ -3015,22 +2965,13 @@ grew out of the @dfn{Vc} project.") (uri (pypi-uri "pyfakefs" version)) (sha256 (base32 - "1cp2yw96fa2qkgi39xa3nlr3inf8wb5rgh9kdq53256ca2r8pdhy")) + "18bcv8yalg80zgigx40fk692yr3wf9ch1hkb0cdplqspyry2mwbd")) (patches (search-patches "python-pyfakefs-remove-bad-test.patch")) (file-name (string-append name "-" version ".tar.gz")))) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-testsuite - (lambda _ - ;; Time difference is larger than expected. - (substitute* "pyfakefs/tests/fake_filesystem_unittest_test.py" - (("(\\s+)def test_copy_real_file" all indent) - (string-append - indent - "@unittest.skip('disabled by guix')\n" - all))))) ;; The default test suite does not run these extra tests. (add-after 'check 'check-pytest-plugin (lambda _ |