mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-01-23 02:14:04 +00:00
Fix unittest for activating pysnooper
This commit is contained in:
parent
b4c8c16ed9
commit
d7d3a80c16
1 changed files with 3 additions and 3 deletions
|
|
@ -1183,11 +1183,11 @@ def test_activate_deactivate_snoop():
|
|||
y = 8
|
||||
return x + y
|
||||
|
||||
os.environ['PYSNOOPER_DISABLED'] = '1'
|
||||
with pysnooper.snoop():
|
||||
pysnooper.tracer.DISABLED = '1'
|
||||
with pysnooper.snoop(string_io):
|
||||
result = my_function('baba')
|
||||
output = string_io.getvalue()
|
||||
assert output == ""
|
||||
|
||||
os.environ['PYSNOOPER_DISABLED'] = ''
|
||||
pysnooper.tracer.DISABLED = ''
|
||||
test_string_io()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue