diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/testtools/files | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-python/testtools/files')
| -rw-r--r-- | dev-python/testtools/files/testtools-2.7.2-py314.patch | 34 | ||||
| -rw-r--r-- | dev-python/testtools/files/testtools-2.7.2-twisted-fix.patch | 45 |
2 files changed, 79 insertions, 0 deletions
diff --git a/dev-python/testtools/files/testtools-2.7.2-py314.patch b/dev-python/testtools/files/testtools-2.7.2-py314.patch new file mode 100644 index 000000000000..afce3b2c12ad --- /dev/null +++ b/dev-python/testtools/files/testtools-2.7.2-py314.patch @@ -0,0 +1,34 @@ +https://github.com/testing-cabal/testtools/commit/79fa5d41a05c423cf43a65d2b347c7c566bcdfa5 + +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__ + diff --git a/dev-python/testtools/files/testtools-2.7.2-twisted-fix.patch b/dev-python/testtools/files/testtools-2.7.2-twisted-fix.patch new file mode 100644 index 000000000000..bbf943be60d1 --- /dev/null +++ b/dev-python/testtools/files/testtools-2.7.2-twisted-fix.patch @@ -0,0 +1,45 @@ +From 5b8cb6497c7159f593e68de6a13e15f7e78e56e3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz> +Date: Mon, 1 Jul 2024 10:00:05 +0200 +Subject: [PATCH] Prepare tests for upcoming twisted version + +Twisted recently changed behavior of logger on failures [1]. It newly +logs the `Main loop terminated.` even on exceptions, which breaks two +test in twistedsupport test suite. This hack attempts to address the +upcoming issue. + +[1] https://github.com/twisted/twisted/pull/12207 + +Upstream-PR: https://github.com/testing-cabal/testtools/pull/387 + +diff --git a/testtools/tests/twistedsupport/test_runtest.py b/testtools/tests/twistedsupport/test_runtest.py +index 4b46cc64..f8faf7c6 100644 +--- a/testtools/tests/twistedsupport/test_runtest.py ++++ b/testtools/tests/twistedsupport/test_runtest.py +@@ -16,7 +16,6 @@ + Contains, + ContainsAll, + ContainsDict, +- EndsWith, + Equals, + Is, + KeysEqual, +@@ -749,7 +748,7 @@ def test_something(self): + test, + { + "traceback": Not(Is(None)), +- "twisted-log": AsText(EndsWith(" foo\n")), ++ "twisted-log": AsText(Contains(" foo\n")), + }, + ), + ("stopTest", test), +@@ -790,7 +789,8 @@ def test_something(self): + result = self.make_result() + runner.run(result) + self.assertThat( +- messages, MatchesListwise([ContainsDict({"message": Equals(("foo",))})]) ++ messages[0:1], ++ MatchesListwise([ContainsDict({"message": Equals(("foo",))})]), + ) + + def test_restore_observers(self): |
