diff options
Diffstat (limited to 'dev-python/testtools')
-rw-r--r-- | dev-python/testtools/Manifest | 3 | ||||
-rw-r--r-- | dev-python/testtools/files/testtools-2.7.2-twisted-fix.patch | 45 | ||||
-rw-r--r-- | dev-python/testtools/testtools-2.7.2.ebuild | 8 |
3 files changed, 52 insertions, 4 deletions
diff --git a/dev-python/testtools/Manifest b/dev-python/testtools/Manifest index aaece635628f..599a59ee50dd 100644 --- a/dev-python/testtools/Manifest +++ b/dev-python/testtools/Manifest @@ -1,3 +1,4 @@ +AUX testtools-2.7.2-twisted-fix.patch 1683 BLAKE2B 67ad6c4c7ac816c45b35f5c49f754228ef80bc699770f0c115383d0a50e8bc0c875e1a1fdedc1a8df5adc8410ed8c29f34553a6f876d0912dcab155d325021c7 SHA512 90910f65bb1987f8e6bee3920630ad22d34e5988153d01aca5eae4bf0d670691ff35788087278deb2df40d0a5d4787eac30847a4e14e54965eedcee9853cc11a DIST testtools-2.7.2.tar.gz 201430 BLAKE2B d827d8e66c85908f4d16aa0762c3b0a454d374a0d23323fc3c123027f55f0e85f4fea9a24b5d1d0279266af2185f08abbcbbdcb785014b237df45a6448587611 SHA512 5815519d2b72d6b1e9f453c02793c70eb7d3b6580a211fb3708cd6121aed3c6100ceb1e35321f481a63b1f999ede030e43f1ae91d3621faf461c1908db767551 -EBUILD testtools-2.7.2.ebuild 1211 BLAKE2B 9b3c8ce1d15a895a3fde0073fd482da7a05db64e799fdfefebbe3b8514adabde3371fa2c4d8075879861634962e2845b7e5cb9d3a0766791c9f133ed64c9af3a SHA512 27a24ee1a379d7ec13324e31011a3b2e08d174388cca2f2f98ef5e5ae60fb1bfe9289a270817ddf152a777dc4db8806373b1456a37fa35d9fd319bf0ef0999cb +EBUILD testtools-2.7.2.ebuild 1226 BLAKE2B d6003520a7d69e54fdee9971a8aefb5d9ccd6dd2fff28fb87c5736d3d9baad0a0f7c674ba164eef7436081043d0edbc460733b34742c30c092f24f63c0ffef84 SHA512 f147884e9035f261cc67eb6f7a55d53c485c52ca1e582b3d77f66fa2785b2b7f7b66a439ab363338f040dacae1fb5ac6f64f5ea6b35ff67f4fff32aa840b09d1 MISC metadata.xml 580 BLAKE2B 5068f4abc80612e7a92fb65865612d93cc4d4803a9cda3555cee34eab48da20f6fb22734b09adeaa068cff135d592b5fbd607157a60052a68e127750f6082b24 SHA512 5807608ef5c6d3fa1a86c715c59afb7c4f3913f69739a0c4ea9b6cf85976077280da6ce019ec4fda6dd6bd490379ee0570d5c98f9d719c0cdaf60a550e01e555 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): diff --git a/dev-python/testtools/testtools-2.7.2.ebuild b/dev-python/testtools/testtools-2.7.2.ebuild index f9c9a6886024..d26da3f05732 100644 --- a/dev-python/testtools/testtools-2.7.2.ebuild +++ b/dev-python/testtools/testtools-2.7.2.ebuild @@ -27,12 +27,14 @@ BDEPEND=" >=dev-python/fixtures-2.0.0[${PYTHON_USEDEP}] dev-python/testscenarios[${PYTHON_USEDEP}] dev-python/testresources[${PYTHON_USEDEP}] - $(python_gen_cond_dep ' - dev-python/twisted[${PYTHON_USEDEP}] - ' 3.{10..12}) + dev-python/twisted[${PYTHON_USEDEP}] ) " +PATCHES=( + "${FILESDIR}/${PN}-2.7.2-twisted-fix.patch" +) + distutils_enable_sphinx doc python_test() { |