File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ def suspend_global_capture(self, in_=False):
145
145
cap .suspend_capturing (in_ = in_ )
146
146
147
147
def suspend (self , in_ = False ):
148
+ # Need to undo local capsys-et-al if it exists before disabling global capture.
148
149
self .suspend_fixture (self ._current_item )
149
150
self .suspend_global_capture (in_ )
150
151
@@ -186,14 +187,11 @@ def resume_fixture(self, item):
186
187
@contextlib .contextmanager
187
188
def global_and_fixture_disabled (self ):
188
189
"""Context manager to temporarily disable global and current fixture capturing."""
189
- # Need to undo local capsys-et-al if it exists before disabling global capture.
190
- self .suspend_fixture (self ._current_item )
191
- self .suspend_global_capture (in_ = False )
190
+ self .suspend ()
192
191
try :
193
192
yield
194
193
finally :
195
- self .resume_global_capture ()
196
- self .resume_fixture (self ._current_item )
194
+ self .resume ()
197
195
198
196
@contextlib .contextmanager
199
197
def item_capture (self , when , item ):
You can’t perform that action at this time.
0 commit comments