forked from pool/python-testtools
Compare commits
2 Commits
Author | SHA256 | Date | |
---|---|---|---|
80813f7f8e | |||
b387000191 |
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 16 05:42:20 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch resolve-testcase-eq-deprecation-warning.patch:
|
||||
* Don't rely on bool(NotImplemented) which is now a TypeError in
|
||||
Python 3.14.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 23 14:06:48 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-testtools
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -34,6 +34,8 @@ URL: https://github.com/testing-cabal/testtools
|
||||
Source0: https://files.pythonhosted.org/packages/source/t/testtools/testtools-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM https://github.com/testing-cabal/testtools/commit/5b8cb6497c7159f593e68de6a13e15f7e78e56e3 Prepare tests for upcoming twisted version
|
||||
Patch0: twisted.patch
|
||||
# PATCH-FIX-UPSTREAM gh#testing-cabal/testtools#424/commits/79fa5d41a05c423cf43a65d2b347c7c566bcdfa5
|
||||
Patch1: resolve-testcase-eq-deprecation-warning.patch
|
||||
BuildRequires: %{python_module hatch_vcs}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module wheel}
|
||||
|
31
resolve-testcase-eq-deprecation-warning.patch
Normal file
31
resolve-testcase-eq-deprecation-warning.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 79fa5d41a05c423cf43a65d2b347c7c566bcdfa5 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Finucane <stephen@that.guru>
|
||||
Date: Fri, 21 Feb 2025 11:14:35 +0000
|
||||
Subject: [PATCH] Resolve deprecation warning
|
||||
|
||||
See [1] for more info.
|
||||
|
||||
[1] https://github.com/python/cpython/issues/79893
|
||||
|
||||
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
||||
---
|
||||
testtools/testcase.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/testtools/testcase.py b/testtools/testcase.py
|
||||
index ad983730..4f4923b3 100644
|
||||
--- a/testtools/testcase.py
|
||||
+++ b/testtools/testcase.py
|
||||
@@ -268,8 +268,10 @@ def _reset(self):
|
||||
|
||||
def __eq__(self, other):
|
||||
eq = getattr(unittest.TestCase, "__eq__", None)
|
||||
- if eq is not None and not unittest.TestCase.__eq__(self, other):
|
||||
- return False
|
||||
+ if eq is not None:
|
||||
+ eq_ = unittest.TestCase.__eq__(self, other)
|
||||
+ if eq_ is NotImplemented or not eq_:
|
||||
+ return False
|
||||
return self.__dict__ == getattr(other, "__dict__", None)
|
||||
|
||||
# We need to explicitly set this since we're overriding __eq__
|
Reference in New Issue
Block a user