mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-01-23 02:14:04 +00:00
parent
bd05c1686f
commit
e3e09d31b5
1 changed files with 5 additions and 1 deletions
|
|
@ -1233,8 +1233,12 @@ def test_disable():
|
|||
return x + y
|
||||
|
||||
with mini_toolbox.TempValueSetter((pysnooper.tracer, 'DISABLED'), True):
|
||||
with pysnooper.snoop(string_io):
|
||||
tracer = pysnooper.snoop(string_io)
|
||||
with tracer:
|
||||
result = my_function('baba')
|
||||
my_decorated_function = tracer(my_function)
|
||||
my_decorated_function('booboo')
|
||||
|
||||
output = string_io.getvalue()
|
||||
assert not output
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue