File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 30
30
from _pytest .python import Function
31
31
from _pytest .python import Module
32
32
from _pytest .runner import CallInfo
33
- import pytest
34
33
35
34
36
35
if sys .version_info [:2 ] < (3 , 11 ):
@@ -141,7 +140,7 @@ def unittest_setup_class_fixture(
141
140
cls = request .cls
142
141
if _is_skipped (cls ):
143
142
reason = cls .__unittest_skip_why__
144
- raise pytest . skip .Exception (reason , _use_item_location = True )
143
+ raise skip .Exception (reason , _use_item_location = True )
145
144
if setup is not None :
146
145
try :
147
146
setup ()
@@ -182,7 +181,7 @@ def unittest_setup_method_fixture(
182
181
self = request .instance
183
182
if _is_skipped (self ):
184
183
reason = self .__unittest_skip_why__
185
- raise pytest . skip .Exception (reason , _use_item_location = True )
184
+ raise skip .Exception (reason , _use_item_location = True )
186
185
if setup is not None :
187
186
setup (self , request .function )
188
187
yield
@@ -280,7 +279,7 @@ def addFailure(
280
279
281
280
def addSkip (self , testcase : unittest .TestCase , reason : str ) -> None :
282
281
try :
283
- raise pytest . skip .Exception (reason , _use_item_location = True )
282
+ raise skip .Exception (reason , _use_item_location = True )
284
283
except skip .Exception :
285
284
self ._addexcinfo (sys .exc_info ())
286
285
You can’t perform that action at this time.
0 commit comments