-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Description
The recently released twisted 25.5.0
is causing the test test_trial_exceptions_with_skips
to fail:
https://github.com/pytest-dev/pytest/actions/runs/15509383216/job/43668300225?pr=13496
Created this MWE:
from __future__ import annotations
from twisted.trial import unittest
import pytest
class TC(unittest.TestCase):
def test_hello(self):
pytest.skip("skip_in_method")
λ uvx --with pytest,twisted==24.11 pytest testing\test_trial.py -q
s [100%]
1 skipped in 0.13s
λ uvx --with pytest,twisted==25.5 pytest testing\test_trial.py -q
F [100%]
============================= FAILURES ==============================
___________________________ TC.test_hello ___________________________
skip_in_method
During handling of the above exception, another exception occurred:
'NoneType' object is not iterable
During handling of the above exception, another exception occurred:
NOTE: Incompatible Exception Representation, displaying natively:
Skipped: skip_in_method
====================== short test summary info ======================
FAILED testing/test_trial.py::TC::test_hello - Failed: NOTE: Incompatible Exception Representation, displaying n...
1 failed in 0.14s
glyph
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
p12tic commentedon Jun 9, 2025
See analysis here twisted/twisted#12467 (comment). pytest patches
twisted.python.failure.Failure.__init__
and it breaks in Twisted 25.5 because there's an additionalexcept/raise
pair in Twisted test framework code.nicoddemus commentedon Jun 9, 2025
Thanks @p12tic appreciate the link.
We are happy to fix pytest, after all we are patching the internals. Do you have any suggestion on how we can fix pytest?
Fix compatibility with Twisted 25
Fix compatibility with Twisted 25
Fix compatibility with Twisted 25
Fix compatibility with Twisted 25
Fix compatibility with Twisted 25
Fix compatibility with Twisted 25
Fix compatibility with Twisted 25
Extract `sys.exc_info` from trial's Failure during the test execution
Twisted support: extract `sys.exc_info` during `addError`
Twisted support: extract `sys.exc_info` during `addError`
Fix compatibility with Twisted 25
Twisted support: extract `sys.exc_info` during `addError`
Fix compatibility with Twisted 25
Twisted support: extract `sys.exc_info` during `addError`
Fix compatibility with Twisted 25
Fix compatibility with Twisted 25 (#13502)
Fix compatibility with Twisted 25 (#13502)
Fix compatibility with Twisted 25 (#13502) (#13531)