-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
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
zope.testrunner fails one test with Python 3.12, succeeding with 3.11 #157
Comments
The test suite passed a week ago on Python 3.12 which suggests either a dependency or the test environment has changed. |
The When I fix this (and a similar AttributeError about
|
Same cause: the code for handing skipped tests is now called without start_test() getting called first. This is a consequence of python/cpython@551aa6a |
I started working on a fix but quickly got stuck: #158. |
@d-maurer Do you maybe have an idea here, how to solve this issue? |
Michael Howitz wrote at 2023-12-15 05:55 -0800:
@d-maurer Do you maybe have an idea here, how to solve this issue?
Currently, I feel sick. Once I am better, I will look into this.
|
I agree with the analysis of @mgedmin. Apparently, python/cpython@551aa6a Alternatively, #158 is an alternative. As @mgedmin reports, it still lets many tests fail because the counting of skipped tests has changed. My impression: in most cases, those differences are not relevant for the test and should not cause its failure. The failures result from doctests tending to check also things which are not relevant. In this case, a normalized might be able to hide those differences. |
seen when testing with the python 3.12 branch, the test succeed with 3.11.7:
Failure in test /home/packages/zope/zope.testrunner/.pybuild/cpython3_3.12/build/zope/testrunner/
tests/testrunner-colors.rst
Failed doctest test for testrunner-colors.rst
File "/home/packages/zope/zope.testrunner/.pybuild/cpython3_3.12/build/zope/testrunner/tests/te
strunner-colors.rst", line 0
File "/home/packages/zope/zope.testrunner/.pybuild/cpython3_3.12/build/zope/testrunner/tests/testrunner-colors.rst", line 165, in testrunner-colors.rst
Failed example:
_ = testrunner.run_internal(defaults_skip)
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python3.12/doctest.py", line 1359, in __run
exec(compile(example.source, filename, "single",
File "<doctest testrunner-colors.rst[14]>", line 1, in
_ = testrunner.run_internal(defaults_skip)
File "/home/packages/zope/zope.testrunner/.pybuild/cpython3_3.12/build/zope/testrunner/init.py", line 55, in run_internal
runner.run()
File "/home/packages/zope/zope.testrunner/.pybuild/cpython3_3.12/build/zope/testrunner/runner.py", line 191, in run
self.run_tests()
File "/home/packages/zope/zope.testrunner/.pybuild/cpython3_3.12/build/zope/testrunner/runner.py", line 292, in run_tests
self.ran += run_layer(self.options, layer_name, layer, tests,
File "/home/packages/zope/zope.testrunner/.pybuild/cpython3_3.12/build/zope/testrunner/runner.py", line 473, in run_layer
return run_tests(options, tests, layer_name, failures, errors, skipped,
File "/home/packages/zope/zope.testrunner/.pybuild/cpython3_3.12/build/zope/testrunner/runner.py", line 399, in run_tests
test(result)
File "/usr/lib/python3.12/unittest/case.py", line 692, in call
return self.run(*args, **kwds)
File "/usr/lib/python3.12/unittest/case.py", line 662, in run
result.stopTest(self)
File "/home/packages/zope/zope.testrunner/.pybuild/cpython3_3.12/build/zope/testrunner/runner.py", line 1023, in stopTest
test.dict.update(self._test_state)
AttributeError: 'TestResult' object has no attribute '_test_state'
The text was updated successfully, but these errors were encountered: