diff options
Diffstat (limited to 'gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch')
| -rw-r--r-- | gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch | 59 |
1 files changed, 59 insertions, 0 deletions
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 00000000000..4ffe9b373d2 --- /dev/null +++ b/gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | https://sources.debian.org/data/main/p/python-fixtures/3.0.0-4/debian/patches/remove-broken-monkey-patch-test.patch | ||
| 2 | |||
| 3 | The last release was May 2016. This can be removed when the next release happens. | ||
| 4 | |||
| 5 | Description: Remove broken monkey patch tests | ||
| 6 | Author: Thomas Goirand <zigo@debian.org> | ||
| 7 | Bug-Debian: https://bugs.debian.org/973239 | ||
| 8 | Forwarded: no | ||
| 9 | Last-Update: 2020-11-12 | ||
| 10 | |||
| 11 | --- python-fixtures-3.0.0.orig/fixtures/tests/_fixtures/test_monkeypatch.py | ||
| 12 | +++ python-fixtures-3.0.0/fixtures/tests/_fixtures/test_monkeypatch.py | ||
| 13 | @@ -181,22 +181,6 @@ class TestMonkeyPatch(testtools.TestCase | ||
| 14 | self._check_restored_static_or_class_method(oldmethod, oldmethod_inst, | ||
| 15 | C, 'foo_cls') | ||
| 16 | |||
| 17 | - def test_patch_classmethod_with_classmethod(self): | ||
| 18 | - oldmethod = C.foo_cls | ||
| 19 | - oldmethod_inst = C().foo_cls | ||
| 20 | - fixture = MonkeyPatch( | ||
| 21 | - 'fixtures.tests._fixtures.test_monkeypatch.C.foo_cls', | ||
| 22 | - D.bar_cls_args) | ||
| 23 | - with fixture: | ||
| 24 | - cls, target_class = C.foo_cls() | ||
| 25 | - self.expectThat(cls, Is(D)) | ||
| 26 | - self.expectThat(target_class, Is(C)) | ||
| 27 | - cls, target_class = C().foo_cls() | ||
| 28 | - self.expectThat(cls, Is(D)) | ||
| 29 | - self.expectThat(target_class, Is(C)) | ||
| 30 | - self._check_restored_static_or_class_method(oldmethod, oldmethod_inst, | ||
| 31 | - C, 'foo_cls') | ||
| 32 | - | ||
| 33 | def test_patch_classmethod_with_function(self): | ||
| 34 | oldmethod = C.foo_cls | ||
| 35 | oldmethod_inst = C().foo_cls | ||
| 36 | @@ -212,23 +196,6 @@ class TestMonkeyPatch(testtools.TestCase | ||
| 37 | self._check_restored_static_or_class_method(oldmethod, oldmethod_inst, | ||
| 38 | C, 'foo_cls') | ||
| 39 | |||
| 40 | - def test_patch_classmethod_with_boundmethod(self): | ||
| 41 | - oldmethod = C.foo_cls | ||
| 42 | - oldmethod_inst = C().foo_cls | ||
| 43 | - d = D() | ||
| 44 | - fixture = MonkeyPatch( | ||
| 45 | - 'fixtures.tests._fixtures.test_monkeypatch.C.foo_cls', | ||
| 46 | - d.bar_two_args) | ||
| 47 | - with fixture: | ||
| 48 | - slf, cls = C.foo_cls() | ||
| 49 | - self.expectThat(slf, Is(d)) | ||
| 50 | - self.expectThat(cls, Is(C)) | ||
| 51 | - slf, cls = C().foo_cls() | ||
| 52 | - self.expectThat(slf, Is(d)) | ||
| 53 | - self.expectThat(cls, Is(C)) | ||
| 54 | - self._check_restored_static_or_class_method(oldmethod, oldmethod_inst, | ||
| 55 | - C, 'foo_cls') | ||
| 56 | - | ||
| 57 | def test_patch_function_with_staticmethod(self): | ||
| 58 | oldmethod = fake_no_args | ||
| 59 | fixture = MonkeyPatch( | ||
