guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: gnu: python-fixtures: Fix building.


From: guix-commits
Subject: 01/04: gnu: python-fixtures: Fix building.
Date: Wed, 11 Aug 2021 09:37:07 -0400 (EDT)

efraim pushed a commit to branch core-updates-frozen
in repository guix.

commit 02fbd89f2b69ebb1793261026c4471280048335f
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Wed Aug 11 16:13:56 2021 +0300

    gnu: python-fixtures: Fix building.
    
    * gnu/packages/check.scm (python-fixtures-bootstrap)[source]: Add patch.
    * gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch:
    New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/check.scm                             | 14 ++---
 .../python-fixtures-remove-monkeypatch-test.patch  | 59 ++++++++++++++++++++++
 3 files changed, 68 insertions(+), 6 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 9ba2971..569b913 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1601,6 +1601,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
   %D%/packages/patches/python-configobj-setuptools.patch       \
   %D%/packages/patches/python-docopt-pytest6-compat.patch      \
+  %D%/packages/patches/python-fixtures-remove-monkeypatch-test.patch   \
   %D%/packages/patches/python-flask-restful-werkzeug-compat.patch      \
   %D%/packages/patches/python-keras-integration-test.patch     \
   %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 9cd5372..eb20d0f 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1578,12 +1578,14 @@ protocol.")))
   (package
     (name "python-fixtures-bootstrap")
     (version "3.0.0")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "fixtures" version))
-              (sha256
-               (base32
-                "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))))
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "fixtures" version))
+        (sha256
+         (base32
+          "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))
+        (patches (search-patches 
"python-fixtures-remove-monkeypatch-test.patch"))))
     (build-system python-build-system)
     (arguments
       `(#:tests? #f
diff --git a/gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch 
b/gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch
new file mode 100644
index 0000000..4ffe9b3
--- /dev/null
+++ b/gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch
@@ -0,0 +1,59 @@
+https://sources.debian.org/data/main/p/python-fixtures/3.0.0-4/debian/patches/remove-broken-monkey-patch-test.patch
+
+The last release was May 2016. This can be removed when the next release 
happens.
+
+Description: Remove broken monkey patch tests
+Author: Thomas Goirand <zigo@debian.org>
+Bug-Debian: https://bugs.debian.org/973239
+Forwarded: no
+Last-Update: 2020-11-12
+
+--- python-fixtures-3.0.0.orig/fixtures/tests/_fixtures/test_monkeypatch.py
++++ python-fixtures-3.0.0/fixtures/tests/_fixtures/test_monkeypatch.py
+@@ -181,22 +181,6 @@ class TestMonkeyPatch(testtools.TestCase
+         self._check_restored_static_or_class_method(oldmethod, oldmethod_inst,
+                 C, 'foo_cls')
+ 
+-    def test_patch_classmethod_with_classmethod(self):
+-        oldmethod = C.foo_cls
+-        oldmethod_inst = C().foo_cls
+-        fixture = MonkeyPatch(
+-            'fixtures.tests._fixtures.test_monkeypatch.C.foo_cls',
+-            D.bar_cls_args)
+-        with fixture:
+-            cls, target_class = C.foo_cls()
+-            self.expectThat(cls, Is(D))
+-            self.expectThat(target_class, Is(C))
+-            cls, target_class = C().foo_cls()
+-            self.expectThat(cls, Is(D))
+-            self.expectThat(target_class, Is(C))
+-        self._check_restored_static_or_class_method(oldmethod, oldmethod_inst,
+-                C, 'foo_cls')
+-
+     def test_patch_classmethod_with_function(self):
+         oldmethod = C.foo_cls
+         oldmethod_inst = C().foo_cls
+@@ -212,23 +196,6 @@ class TestMonkeyPatch(testtools.TestCase
+         self._check_restored_static_or_class_method(oldmethod, oldmethod_inst,
+                 C, 'foo_cls')
+ 
+-    def test_patch_classmethod_with_boundmethod(self):
+-        oldmethod = C.foo_cls
+-        oldmethod_inst = C().foo_cls
+-        d = D()
+-        fixture = MonkeyPatch(
+-            'fixtures.tests._fixtures.test_monkeypatch.C.foo_cls',
+-            d.bar_two_args)
+-        with fixture:
+-            slf, cls = C.foo_cls()
+-            self.expectThat(slf, Is(d))
+-            self.expectThat(cls, Is(C))
+-            slf, cls = C().foo_cls()
+-            self.expectThat(slf, Is(d))
+-            self.expectThat(cls, Is(C))
+-        self._check_restored_static_or_class_method(oldmethod, oldmethod_inst,
+-                C, 'foo_cls')
+-
+     def test_patch_function_with_staticmethod(self):
+         oldmethod = fake_no_args
+         fixture = MonkeyPatch(



reply via email to

[Prev in Thread] Current Thread [Next in Thread]