Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/_pytest/unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from _pytest.python import Function
from _pytest.python import Module
from _pytest.runner import CallInfo
import pytest


if sys.version_info[:2] < (3, 11):
Expand Down Expand Up @@ -141,7 +140,7 @@ def unittest_setup_class_fixture(
cls = request.cls
if _is_skipped(cls):
reason = cls.__unittest_skip_why__
raise pytest.skip.Exception(reason, _use_item_location=True)
raise skip.Exception(reason, _use_item_location=True)
if setup is not None:
try:
setup()
Expand Down Expand Up @@ -182,7 +181,7 @@ def unittest_setup_method_fixture(
self = request.instance
if _is_skipped(self):
reason = self.__unittest_skip_why__
raise pytest.skip.Exception(reason, _use_item_location=True)
raise skip.Exception(reason, _use_item_location=True)
if setup is not None:
setup(self, request.function)
yield
Expand Down Expand Up @@ -280,7 +279,7 @@ def addFailure(

def addSkip(self, testcase: unittest.TestCase, reason: str) -> None:
try:
raise pytest.skip.Exception(reason, _use_item_location=True)
raise skip.Exception(reason, _use_item_location=True)
except skip.Exception:
self._addexcinfo(sys.exc_info())

Expand Down
Loading