From 2a2fe3ae0004d9c256eb895af545112828c08f705a2444acc55f52cc323d7d85 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 1 Oct 2022 17:21:08 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-daemon?expand=0&rev=36 --- remove_double_patch.patch | 47 --------------------------------------- remove_safe_hasattr.patch | 15 ------------- 2 files changed, 62 deletions(-) delete mode 100644 remove_double_patch.patch delete mode 100644 remove_safe_hasattr.patch diff --git a/remove_double_patch.patch b/remove_double_patch.patch deleted file mode 100644 index 1c40bf3..0000000 --- a/remove_double_patch.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0c67a3c6407fbf4483ccfc94a7a0d78cf3379296 Mon Sep 17 00:00:00 2001 -From: Miro Hrončok -Date: Sep 29 2021 10:05:27 +0000 -Subject: Remove incorrect double-patch of objects in test cases. - - -The specific test cases relying on the patches, already are decorated -to patch the specific attributes needed. We don't need a general patch -of the attributes in the test case setup. - -Signed-off-by: Ben Finney - ---- - ---- - ChangeLog | 4 ++++ - test/test_pidfile.py | 6 ------ - 2 files changed, 4 insertions(+), 6 deletions(-) - ---- a/ChangeLog -+++ b/ChangeLog -@@ -14,6 +14,10 @@ Version 2.3.0 - :Released: 2021-02-21 - :Maintainer: Ben Finney - -+* Remove incorrect double-patch of objects in test cases. -+ -+ Closes: Pagure #62. Thanks to Miro Hrončok for the report. -+ - Removed: - - * Remove support for Python versions older than Python 3. ---- a/test/test_pidfile.py -+++ b/test/test_pidfile.py -@@ -391,12 +391,6 @@ class TimeoutPIDLockFile_TestCase(scaffo - pidlockfile_scenarios = make_pidlockfile_scenarios() - self.pidlockfile_scenario = pidlockfile_scenarios['simple'] - -- for func_name in ['__init__', 'acquire']: -- func_patcher = unittest.mock.patch.object( -- lockfile.pidlockfile.PIDLockFile, func_name) -- func_patcher.start() -- self.addCleanup(func_patcher.stop) -- - self.scenario = { - 'pidfile_path': self.pidlockfile_scenario['pidfile_path'], - 'acquire_timeout': self.getUniqueInteger(), diff --git a/remove_safe_hasattr.patch b/remove_safe_hasattr.patch deleted file mode 100644 index 19ff367..0000000 --- a/remove_safe_hasattr.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- - test/test_metadata.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/test/test_metadata.py -+++ b/test/test_metadata.py -@@ -44,7 +44,7 @@ class HasAttribute(testtools.matchers.Ma - def match(self, instance): - """ Assert the object `instance` has an attribute named `name`. """ - result = None -- if not testtools.helpers.safe_hasattr(instance, self.attribute_name): -+ if not hasattr(instance, self.attribute_name): - result = AttributeNotFoundMismatch(instance, self.attribute_name) - return result -