14
0

- Add patch python-312.patch:

* Fiddle with the refcounting for Python 3.12.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-unittest-xml-reporting?expand=0&rev=34
This commit is contained in:
2024-03-18 05:35:27 +00:00
committed by Git OBS Bridge
parent 189208fddc
commit 11b0fd3312
3 changed files with 21 additions and 0 deletions

13
python-312.patch Normal file
View File

@@ -0,0 +1,13 @@
Index: unittest-xml-reporting-3.2.0/tests/testsuite.py
===================================================================
--- unittest-xml-reporting-3.2.0.orig/tests/testsuite.py
+++ unittest-xml-reporting-3.2.0/tests/testsuite.py
@@ -807,6 +807,8 @@ class XMLTestRunnerTestCase(unittest.Tes
countBeforeTest = sys.getrefcount(self.DummyRefCountTest.dummy)
runner = self._test_xmlrunner(suite)
countAfterTest = sys.getrefcount(self.DummyRefCountTest.dummy)
+ if sys.version_info >= (3, 12):
+ countBeforeTest += 1
self.assertEqual(countBeforeTest, countAfterTest)
class StderrXMLTestRunner(xmlrunner.XMLTestRunner):