unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Pytest update to 2.9.2
@ 2016-12-05 21:33 Leo Famulari
  2016-12-06 10:41 ` Hartmut Goebel
  0 siblings, 1 reply; 3+ messages in thread
From: Leo Famulari @ 2016-12-05 21:33 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 77 bytes --]

I think this should get built in its own branch to make sure nothing
breaks.

[-- Attachment #1.2: 0001-gnu-python-pytest-Update-to-2.9.2.patch --]
[-- Type: text/plain, Size: 4687 bytes --]

From fb0f51fe4261de846672e42dd3c59d4d005325c4 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Pytest update to 2.9.2
  2016-12-05 21:33 Pytest update to 2.9.2 Leo Famulari
@ 2016-12-06 10:41 ` Hartmut Goebel
  2016-12-09  0:28   ` Leo Famulari
  0 siblings, 1 reply; 3+ messages in thread
From: Hartmut Goebel @ 2016-12-06 10:41 UTC (permalink / raw)
  To: guix-devel

Am 05.12.2016 um 22:33 schrieb Leo Famulari:
> +             (substitute* "testing/test_argcomplete.py"
> +               (("def test_remove_dir_prefix" line)
> +                (string-append "@pytest.mark.skip"
> +                               "(reason=\"Assumes that /usr exists.\")\n    "
> +                               line)))

These trailing spaces in the replacement string are a bit irritating.
Perhaps its better to search for "^\s+def …" and replace with "   
@pytest.skip…" (leading spaces here). I don't know.

Otherwise LGTM.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Pytest update to 2.9.2
  2016-12-06 10:41 ` Hartmut Goebel
@ 2016-12-09  0:28   ` Leo Famulari
  0 siblings, 0 replies; 3+ messages in thread
From: Leo Famulari @ 2016-12-09  0:28 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Tue, Dec 06, 2016 at 11:41:24AM +0100, Hartmut Goebel wrote:
> Am 05.12.2016 um 22:33 schrieb Leo Famulari:
> > +             (substitute* "testing/test_argcomplete.py"
> > +               (("def test_remove_dir_prefix" line)
> > +                (string-append "@pytest.mark.skip"
> > +                               "(reason=\"Assumes that /usr exists.\")\n    "
> > +                               line)))
> 
> These trailing spaces in the replacement string are a bit irritating.
> Perhaps its better to search for "^\s+def …" and replace with "   
> @pytest.skip…" (leading spaces here). I don't know.
> 
> Otherwise LGTM.

Should we try this with your Sphinx update patches on a python-updates
branch? After staging is merged?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-09  0:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-05 21:33 Pytest update to 2.9.2 Leo Famulari
2016-12-06 10:41 ` Hartmut Goebel
2016-12-09  0:28   ` Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).