[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/17: gnu: python-pytest: Update to 4.3.0.
From: |
guix-commits |
Subject: |
07/17: gnu: python-pytest: Update to 4.3.0. |
Date: |
Mon, 4 Mar 2019 17:03:48 -0500 (EST) |
mbakke pushed a commit to branch core-updates
in repository guix.
commit 1a246c01c6d573b6226fd273f648d231e6ec38f1
Author: Marius Bakke <address@hidden>
Date: Mon Mar 4 18:13:18 2019 +0100
gnu: python-pytest: Update to 4.3.0.
* gnu/packages/patches/python-pytest-pluggy-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/check.scm (python-pytest): Update to 4.3.0.
[source](patches): New field.
[arguments]: Skip five new tests. Disable tests by passing them as
arguments.
---
gnu/local.mk | 1 +
gnu/packages/check.scm | 32 ++++++-----
.../patches/python-pytest-pluggy-compat.patch | 64 ++++++++++++++++++++++
3 files changed, 83 insertions(+), 14 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 64d4324..de35288 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1182,6 +1182,7 @@ dist_patch_DATA =
\
%D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \
%D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \
%D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \
+ %D%/packages/patches/python-pytest-pluggy-compat.patch \
%D%/packages/patches/python2-subprocess32-disable-input-test.patch \
%D%/packages/patches/python-unittest2-python3-compat.patch \
%D%/packages/patches/python-unittest2-remove-argparse.patch \
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 03e6c5f..2013249 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -660,31 +660,35 @@ standard library.")
(define-public python-pytest
(package
(name "python-pytest")
- (version "3.8.0")
+ (version "4.3.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
+ (patches (search-patches "python-pytest-pluggy-compat.patch"))
(sha256
(base32
- "17grcfvd6ggvvqmprwv5y8g319nayam70hr43ssjwj40ws27z858"))))
+ "077gzimi9xiiyzpc3xjpb5yfgz038xkldg91mmbdvzr7z15isyh6"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-before 'check 'disable-invalid-tests
+ (replace 'check
(lambda _
- ;; Some tests involves the /usr directory, and fails.
- (substitute* "testing/test_argcomplete.py"
- (("def test_remove_dir_prefix\\(self\\):")
- "@pytest.mark.xfail\n def test_remove_dir_prefix(self):"))
- (substitute* "testing/test_argcomplete.py"
- (("def test_remove_dir_prefix" line)
- (string-append "@pytest.mark.skip"
- "(reason=\"Assumes that /usr exists.\")\n "
- line)))
- #t))
- (replace 'check (lambda _ (invoke "pytest" "-vv"))))))
+ (invoke "pytest" "-vv" "-k"
+ (string-append
+ ;; These tests involve the /usr directory, and fails.
+ "not test_remove_dir_prefix"
+ " and not test_argcomplete"
+ ;; This test tries to override PYTHONPATH, and
+ ;; subsequently fails to locate the test libraries.
+ " and not test_collection"
+ ;; These tests fail when run in verbose mode:
+ ;; <https://github.com/pytest-dev/pytest/issues/4879>.
+ " and not test_dont_rewrite_if_hasattr_fails"
+ " and not test_len"
+ " and not test_custom_repr"
+ " and not test_name")))))))
(propagated-inputs
`(("python-atomicwrites" ,python-atomicwrites)
("python-attrs" ,python-attrs-bootstrap)
diff --git a/gnu/packages/patches/python-pytest-pluggy-compat.patch
b/gnu/packages/patches/python-pytest-pluggy-compat.patch
new file mode 100644
index 0000000..ac33b86
--- /dev/null
+++ b/gnu/packages/patches/python-pytest-pluggy-compat.patch
@@ -0,0 +1,64 @@
+Fix test failures when built against Pluggy 0.9.
+
+Taken from this upstream commit:
+https://github.com/pytest-dev/pytest/commit/a68f4fd2b9e99c82476d0e04ebcf561aeddbcb2e
+
+diff --git a/testing/test_assertion.py b/testing/test_assertion.py
+index b659233eb..e4fe56c6f 100644
+--- a/testing/test_assertion.py
++++ b/testing/test_assertion.py
+@@ -209,7 +209,7 @@ def load(self, require=True, *args, **kwargs):
+ import spamplugin
+ return spamplugin
+
+- def iter_entry_points(name):
++ def iter_entry_points(group, name=None):
+ yield DummyEntryPoint()
+
+ pkg_resources.iter_entry_points = iter_entry_points
+diff --git a/testing/test_config.py b/testing/test_config.py
+index f9f22a63e..1e29b83f1 100644
+--- a/testing/test_config.py
++++ b/testing/test_config.py
+@@ -514,8 +514,8 @@ def test_preparse_ordering_with_setuptools(testdir,
monkeypatch):
+ pkg_resources = pytest.importorskip("pkg_resources")
+ monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False)
+
+- def my_iter(name):
+- assert name == "pytest11"
++ def my_iter(group, name=None):
++ assert group == "pytest11"
+
+ class Dist(object):
+ project_name = "spam"
+@@ -552,8 +552,8 @@ def test_setuptools_importerror_issue1479(testdir,
monkeypatch):
+ pkg_resources = pytest.importorskip("pkg_resources")
+ monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False)
+
+- def my_iter(name):
+- assert name == "pytest11"
++ def my_iter(group, name=None):
++ assert group == "pytest11"
+
+ class Dist(object):
+ project_name = "spam"
+@@ -583,8 +583,8 @@ def
test_plugin_preparse_prevents_setuptools_loading(testdir, monkeypatch, block
+
+ plugin_module_placeholder = object()
+
+- def my_iter(name):
+- assert name == "pytest11"
++ def my_iter(group, name=None):
++ assert group == "pytest11"
+
+ class Dist(object):
+ project_name = "spam"
+@@ -621,7 +621,7 @@ def load(self):
+ def test_disable_plugin_autoload(testdir, monkeypatch, parse_args,
should_load):
+ pkg_resources = pytest.importorskip("pkg_resources")
+
+- def my_iter(name):
++ def my_iter(group, name=None):
+ raise AssertionError("Should not be called")
+
+ class PseudoPlugin(object):
- 09/17: gnu: python-flake8: Update to 3.7.7., (continued)
- 09/17: gnu: python-flake8: Update to 3.7.7., guix-commits, 2019/03/04
- 12/17: gnu: python-pympler: Update to 0.6., guix-commits, 2019/03/04
- 15/17: gnu: python-pytz: Update to 2018.9., guix-commits, 2019/03/04
- 14/17: gnu: python-attrs: Update to 19.1.0., guix-commits, 2019/03/04
- 13/17: gnu: python-attrs-bootstrap: Update to 18.2.0., guix-commits, 2019/03/04
- 08/17: gnu: python-six: Update to 1.12.0., guix-commits, 2019/03/04
- 17/17: gnu: pcre: Update to 8.43., guix-commits, 2019/03/04
- 10/17: gnu: python-zope-event: Update to 4.4., guix-commits, 2019/03/04
- 11/17: gnu: python-zope-interface: Update to 4.6.0., guix-commits, 2019/03/04
- 16/17: gnu: python-fonttools: Update to 3.38.0., guix-commits, 2019/03/04
- 07/17: gnu: python-pytest: Update to 4.3.0.,
guix-commits <=