Patchwork [1/2] gnu: Add python-pytest-2.9.2.

login
register
mail settings
Submitter Leo Famulari
Date Oct. 30, 2016, 10:48 p.m.
Message ID <8bd646d465c0c04bcff77fa3927ef7882c2f7262.1477867669.git.leo@famulari.name>
Download mbox | patch
Permalink /patch/17027/
State New
Headers show

Comments

Leo Famulari - Oct. 30, 2016, 10:48 p.m.
* gnu/packages/python.scm (python-pytest-2.9.2): New variable.
---
 gnu/packages/python.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
Ludovic Court├Ęs - Nov. 3, 2016, 1:36 p.m.
Leo Famulari <leo@famulari.name> skribis:

> * gnu/packages/python.scm (python-pytest-2.9.2): New variable.

LGTM, thanks!

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 9c7320f..ff3df3b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1665,6 +1665,31 @@  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")