As mentioned in the XXX comment here:
|
def finish(self, request: SubRequest) -> None: |
|
exc = None |
|
try: |
|
while self._finalizers: |
|
try: |
|
func = self._finalizers.pop() |
|
func() |
|
except BaseException as e: |
|
# XXX Only first exception will be seen by user, |
|
# ideally all should be reported. |
|
if exc is None: |
|
exc = e |
|
if exc: |
|
raise exc |
This means information on the extra errors that occurred is not reported, which should never happen ideally.
We should instead raise an exception group in this case, like we do for nodes since pytest 7.3 (#10226).
As mentioned in the XXX comment here:
pytest/src/_pytest/fixtures.py
Lines 1019 to 1032 in 6ed0051
This means information on the extra errors that occurred is not reported, which should never happen ideally.
We should instead raise an exception group in this case, like we do for nodes since pytest 7.3 (#10226).