From fb0f51fe4261de846672e42dd3c59d4d005325c4 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 4 Dec 2016 18:24:02 -0500 Subject: [PATCH] gnu: python-pytest: Update to 2.9.2. * gnu/packages/python.scm (python-pytest, python2-pytest): Update to 2.9.2. [arguments]: Use 'disable-invalid-test' phase from python-pytest-2.9.2. (python-pytest-2.9.2): Remove variable. (python-cryptography, python2-cryptography)[native-inputs]: Use python-pytest. * gnu/packages/backup.scm (borg)[native-inputs]: Use python-pytest. --- gnu/packages/backup.scm | 4 +--- gnu/packages/python.scm | 52 ++++++++++++++----------------------------------- 2 files changed, 16 insertions(+), 40 deletions(-) diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index a503b0660..5f1c9ecd1 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -475,9 +475,7 @@ detection, and lossless compression.") (native-inputs `(("python-cython" ,python-cython) ("python-setuptools-scm" ,python-setuptools-scm) - ;; Borg 1.0.8's test suite uses 'tmpdir_factory', which was introduced in - ;; pytest 2.8. - ("python-pytest" ,python-pytest-2.9.2) + ("python-pytest" ,python-pytest) ;; For generating the documentation. ("python-sphinx" ,python-sphinx) ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme))) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 0df949667..aff48121e 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1633,23 +1633,26 @@ code introspection, and logging.") (define-public python-pytest (package (name "python-pytest") - (version "2.7.3") + (version "2.9.2") (source (origin (method url-fetch) - (uri (string-append - "https://pypi.python.org/packages/source/p/pytest/pytest-" - version ".tar.gz")) + (uri (pypi-uri "pytest" version)) (sha256 (base32 - "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm")) - (modules '((guix build utils))) - (snippet - ;; One of the tests involves the /usr directory, so it fails. - '(substitute* "testing/test_argcomplete.py" - (("def test_remove_dir_prefix\\(self\\):") - "@pytest.mark.xfail\n def test_remove_dir_prefix(self):"))))) + "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'disable-invalid-test + (lambda _ + (substitute* "testing/test_argcomplete.py" + (("def test_remove_dir_prefix" line) + (string-append "@pytest.mark.skip" + "(reason=\"Assumes that /usr exists.\")\n " + line))) + #t))))) (propagated-inputs `(("python-py" ,python-py))) (native-inputs @@ -1666,31 +1669,6 @@ and many external plugins.") (define-public python2-pytest (package-with-python2 python-pytest)) -;; This package is used by Borg until we can upgrade all our Python packages to -;; use a more recent pytest. -(define-public python-pytest-2.9.2 - (package - (inherit python-pytest) - (name "python-pytest") - (version "2.9.2") - (source (origin - (method url-fetch) - (uri (pypi-uri "pytest" version)) - (sha256 - (base32 - "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j")))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'disable-invalid-test - (lambda _ - (substitute* "testing/test_argcomplete.py" - (("def test_remove_dir_prefix" line) - (string-append "@pytest.mark.skip" - "(reason=\"Assumes that /usr exists.\")\n " - line))) - #t))))))) - (define-public python-pytest-cov (package (name "python-pytest-cov") @@ -6432,7 +6410,7 @@ responses, rather than doing any computation.") ("python-pyasn1" ,python-pyasn1) ("python-pyasn1-modules" ,python-pyasn1-modules) ("python-pytz" ,python-pytz) - ("python-pytest" ,python-pytest-2.9.2))) + ("python-pytest" ,python-pytest))) (home-page "https://github.com/pyca/cryptography") (synopsis "Cryptographic recipes and primitives for Python") (description -- 2.11.0