[PATCH] gnu: Enable python-parse-type tests.

  • Done
  • quality assurance status badge
Details
One participant
  • Danny Milosavljevic
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal

Debbugs page

Danny Milosavljevic wrote 8 years ago
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20170512200518.29872-1-dannym@scratchpost.org
* 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(-)

Toggle diff (31 lines)
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")
Danny Milosavljevic wrote 8 years ago
[PATCH v2] gnu: Enable python-parse-type tests.
(address . 26900@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20170512203511.21356-1-dannym@scratchpost.org
* 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(-)

Toggle diff (44 lines)
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")
Danny Milosavljevic wrote 8 years ago
(no subject)
(address . control@debbugs.gnu.org)
20170513174607.1d03b436@scratchpost.org
block 26906 by 26900
Danny Milosavljevic wrote 8 years ago
(address . control@debbugs.gnu.org)
20170525130429.537a9197@scratchpost.org
close 26900
close 26906
close 26999
?
Your comment

This issue is archived.

To comment on this conversation send an email to 26900@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 26900
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help