Archived
1
0
Fork 0

gnu: python-parameterized: Update to 0.7.1.

* gnu/packages/patches/python2-parameterized-docstring-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/check.scm (python-parameterized): Update to 0.7.1.
[arguments]: Remove #:tests?.  Add #:phases to override 'check' phase.
[native-inputs]: Add PYTHON-MOCK and PYTHON-NOSE.
[properties]: New field.
(python2-parameterized)[source](patches): New field.
This commit is contained in:
Marius Bakke 2020-01-19 20:36:24 +01:00
parent 544ea9c2df
commit ae3909eb4c
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA
3 changed files with 41 additions and 4 deletions

View file

@ -1321,6 +1321,7 @@ dist_patch_DATA = \
%D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \
%D%/packages/patches/python-testtools.patch \ %D%/packages/patches/python-testtools.patch \
%D%/packages/patches/python-packaging-test-arch.patch \ %D%/packages/patches/python-packaging-test-arch.patch \
%D%/packages/patches/python2-parameterized-docstring-test.patch \
%D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \
%D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \
%D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \

View file

@ -580,25 +580,43 @@ but it works for any C/C++ project.")
(define-public python-parameterized (define-public python-parameterized
(package (package
(name "python-parameterized") (name "python-parameterized")
(version "0.6.1") (version "0.7.1")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "parameterized" version)) (uri (pypi-uri "parameterized" version))
(sha256 (sha256
(base32 (base32
"1qj1939shm48d9ql6fm1nrdy4p7sdyj8clz1szh5swwpf1qqxxfa")))) "1vapry9lyfb2mlpgk2wh9079hzxzq5120bsczncxxay663mdp53a"))))
(build-system python-build-system) (build-system python-build-system)
(arguments '(#:tests? #f)) ; there are no tests (arguments
'(#:phases (modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
(invoke "nosetests" "-v")
(format #t "test suite not run~%"))
#t)))))
(native-inputs
`(("python-mock" ,python-mock)
("python-nose" ,python-nose)))
(home-page "https://github.com/wolever/parameterized") (home-page "https://github.com/wolever/parameterized")
(synopsis "Parameterized testing with any Python test framework") (synopsis "Parameterized testing with any Python test framework")
(description (description
"Parameterized is a Python library that aims to fix parameterized testing "Parameterized is a Python library that aims to fix parameterized testing
for every Python test framework. It supports nose, py.test, and unittest.") for every Python test framework. It supports nose, py.test, and unittest.")
(properties `((python2-variant . ,(delay python2-parameterized))))
(license license:bsd-2))) (license license:bsd-2)))
(define-public python2-parameterized (define-public python2-parameterized
(package-with-python2 python-parameterized)) (let ((base (package-with-python2 (strip-python2-variant
python-parameterized))))
(package/inherit
base
(source
(origin
(inherit (package-source base))
(patches (search-patches "python2-parameterized-docstring-test.patch")))))))
(define-public python-minimock (define-public python-minimock
(package (package

View file

@ -0,0 +1,18 @@
Skip unicode docstring test, required when running on Python 2.
See <https://github.com/wolever/parameterized/issues/44>.
--- a/parameterized/test.py
+++ b/parameterized/test.py
@@ -284,11 +284,6 @@
" More" %(foo, )
)
- @parameterized.expand([param("foo")])
- def test_unicode_docstring(self, foo):
- u"""Döcumentation."""
- self._assert_docstring(u"Döcumentation [with foo=%r]." %(foo, ))
-
@parameterized.expand([param("foo", )])
def test_default_values_get_correct_value(self, foo, bar=12):
"""Documentation"""