We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
There is a test error while testing in Debian autopkgtest testsuite.
_____________ XMLTestRunnerTestCase.test_xmlrunner_hold_traceback ______________ self = <tests.testsuite.XMLTestRunnerTestCase testMethod=test_xmlrunner_hold_traceback> @unittest.skipIf(not hasattr(sys, 'getrefcount'), 'skip - PyPy does not have sys.getrefcount.') @unittest.skipIf((3, 0) <= sys.version_info < (3, 4), 'skip - test not garbage collected. ' 'https://bugs.python.org/issue11798.') def test_xmlrunner_hold_traceback(self): suite = unittest.TestSuite() suite.addTest(self.DummyRefCountTest('test_fail')) countBeforeTest = sys.getrefcount(self.DummyRefCountTest.dummy) runner = self._test_xmlrunner(suite) countAfterTest = sys.getrefcount(self.DummyRefCountTest.dummy) > self.assertEqual(countBeforeTest, countAfterTest) E AssertionError: 5 != 6 tests/testsuite.py:810: AssertionError
I have created a patch to address this error,
--- a/tests/testsuite.py +++ b/tests/testsuite.py @@ -802,10 +802,16 @@ class XMLTestRunnerTestCase(unittest.Tes 'skip - test not garbage collected. ' 'https://bugs.python.org/issue11798.') def test_xmlrunner_hold_traceback(self): + import gc suite = unittest.TestSuite() suite.addTest(self.DummyRefCountTest('test_fail')) countBeforeTest = sys.getrefcount(self.DummyRefCountTest.dummy) runner = self._test_xmlrunner(suite) + + gc.collect() + for obj in gc.get_referrers(self.DummyRefCountTest.dummy): + print("Referrer:", obj) + countAfterTest = sys.getrefcount(self.DummyRefCountTest.dummy) self.assertEqual(countBeforeTest, countAfterTest)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
There is a test error while testing in Debian autopkgtest testsuite.
I have created a patch to address this error,
The text was updated successfully, but these errors were encountered: