GNU bug report logs - #26900
[PATCH] gnu: Enable python-parse-type tests.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Fri, 12 May 2017 20:06:01 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26900 in the body.
You can then email your comments to 26900 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#26900; Package guix-patches. (Fri, 12 May 2017 20:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 12 May 2017 20:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: guix-patches <at> gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH] gnu: Enable python-parse-type tests.
Date: Fri, 12 May 2017 22:05:18 +0200
* gnu/packages/python.scm (python-parse-type)[arguments]: Enable tests.
[native-inputs]: Add python-pytest, python-pytest-runner.
[properties]: Add python2-variant.
(python2-parse-type): New variable.
---
 gnu/packages/python.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index dc7adf24e..e32397b59 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1488,13 +1488,25 @@ backported for previous versions of Python from 2.4 to 3.3.")
     (propagated-inputs
      `(("python-six" ,python-six)
        ("python-parse" ,python-parse)))
-    (arguments '(#:tests? #f))            ;TODO: tests require pytest
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-pytest-runner" ,python-pytest-runner)))
     (home-page "https://github.com/jenisys/parse_type")
     (synopsis "Extended parse module")
     (description
      "Parse_type extends the python parse module.")
+    (properties
+     `((python2-variant . ,(delay python2-parse-type))))
     (license license:bsd-3)))
 
+(define-public python2-parse-type
+  (let ((base (package-with-python2
+                (strip-python2-variant python-parse-type))))
+    (package (inherit base)
+      (propagated-inputs
+       `(("python2-enum34" ,python2-enum34)
+         ,@(package-propagated-inputs base))))))
+
 (define-public python-parse
   (package
     (name "python-parse")




Information forwarded to guix-patches <at> gnu.org:
bug#26900; Package guix-patches. (Fri, 12 May 2017 20:36:02 GMT) Full text and rfc822 format available.

Message #8 received at 26900 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: 26900 <at> debbugs.gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH v2] gnu: Enable python-parse-type tests.
Date: Fri, 12 May 2017 22:35:11 +0200
* gnu/packages/python.scm (python-parse-type)[arguments]: Enable tests.
Add phase "patch-tests".
[native-inputs]: Add python-pytest, python-pytest-runner.
[properties]: Add python2-variant.
(python2-parse-type): New variable.
---
 gnu/packages/python.scm | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index dc7adf24e..29e3458c6 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1485,16 +1485,38 @@ backported for previous versions of Python from 2.4 to 3.3.")
        (base32
         "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
     (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-tests
+           (lambda _
+             (substitute* "tests/test_parse_type_parse.py"
+               ;; Newer Python versions don't have the problem this test tests.
+               (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
+                ""))
+             #t)))))
     (propagated-inputs
      `(("python-six" ,python-six)
        ("python-parse" ,python-parse)))
-    (arguments '(#:tests? #f))            ;TODO: tests require pytest
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-pytest-runner" ,python-pytest-runner)))
     (home-page "https://github.com/jenisys/parse_type")
     (synopsis "Extended parse module")
     (description
      "Parse_type extends the python parse module.")
+    (properties
+     `((python2-variant . ,(delay python2-parse-type))))
     (license license:bsd-3)))
 
+(define-public python2-parse-type
+  (let ((base (package-with-python2
+                (strip-python2-variant python-parse-type))))
+    (package (inherit base)
+      (propagated-inputs
+       `(("python2-enum34" ,python2-enum34)
+         ,@(package-propagated-inputs base))))))
+
 (define-public python-parse
   (package
     (name "python-parse")




Added indication that bug 26900 blocks26906 Request was from Danny Milosavljevic <dannym <at> scratchpost.org> to control <at> debbugs.gnu.org. (Sat, 13 May 2017 15:47:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 26900 <at> debbugs.gnu.org and Danny Milosavljevic <dannym <at> scratchpost.org> Request was from Danny Milosavljevic <dannym <at> scratchpost.org> to control <at> debbugs.gnu.org. (Thu, 25 May 2017 11:05:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Jun 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 302 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.