Skip to content

runner: don't treat unittest.SkipTest as an interactive exception#13924

Merged
bluetech merged 2 commits into
pytest-dev:mainfrom
bluetech:lazy-import-unittest
Nov 11, 2025
Merged

runner: don't treat unittest.SkipTest as an interactive exception#13924
bluetech merged 2 commits into
pytest-dev:mainfrom
bluetech:lazy-import-unittest

Conversation

@bluetech

Copy link
Copy Markdown
Member

Fix #13917.

Instead of special casing in the debugging plugin, it seems more correct to just not treat unittest.SkipTest as an interactive exception, similarly to pytest's own Skipped. The pytest_make_collect_report hook in runner.py already treats them the same. This fixes the issue more generally.

Instead of special casing in the debugging plugin, it seems more correct
to just not treat `unittest.SkipTest` as an interactive exception,
similarly to pytest's own `Skipped`. The `pytest_make_collect_report`
hook in runner.py already treats them the same. This fixes the issue
more generally.
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Nov 10, 2025

@nicoddemus nicoddemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@bluetech bluetech merged commit f0e4585 into pytest-dev:main Nov 11, 2025
33 checks passed
@bluetech bluetech deleted the lazy-import-unittest branch November 11, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't import unittest in debugging.py

2 participants