File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 3
3
import functools
4
4
import sys
5
5
import types
6
+ import unittest
6
7
from typing import Any
7
8
from typing import Callable
8
9
from typing import Generator
@@ -293,7 +294,9 @@ def pytest_exception_interact(
293
294
sys .stdout .write (out )
294
295
sys .stdout .write (err )
295
296
assert call .excinfo is not None
296
- _enter_pdb (node , call .excinfo , report )
297
+
298
+ if not isinstance (call .excinfo .value , unittest .SkipTest ):
299
+ _enter_pdb (node , call .excinfo , report )
297
300
298
301
def pytest_internalerror (self , excinfo : ExceptionInfo [BaseException ]) -> None :
299
302
tb = _postmortem_traceback (excinfo )
Original file line number Diff line number Diff line change @@ -123,6 +123,18 @@ def test_func():
123
123
)
124
124
assert rep .skipped
125
125
assert len (pdblist ) == 0
126
+
127
+ def test_pdb_on_raise_skiptest (self , pytester , pdblist ) -> None :
128
+ rep = runpdb_and_get_report (
129
+ pytester ,
130
+ """
131
+ import unittest
132
+
133
+ raise unittest.SkipTest("This is a common way to skip an entire file.")
134
+ """ ,
135
+ )
136
+ assert rep .skipped
137
+ assert len (pdblist ) == 0
126
138
127
139
def test_pdb_on_BdbQuit (self , pytester , pdblist ) -> None :
128
140
rep = runpdb_and_get_report (
You can’t perform that action at this time.
0 commit comments