File: python-fixtures-remove-monkeypatch-test.patch

package info (click to toggle)
guix 1.4.0-9
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 161,500 kB
  • sloc: lisp: 861,023; cpp: 10,741; javascript: 9,632; sh: 8,913; makefile: 951; ansic: 558; python: 129; sql: 33; sed: 16
file content (59 lines) | stat: -rw-r--r-- 2,417 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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(