mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-01-23 10:15:11 +00:00
commit
1946781129
2 changed files with 24 additions and 0 deletions
10
tests/test_korean.py
Normal file
10
tests/test_korean.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import pytest
|
||||
import pysnooper
|
||||
|
||||
@pysnooper.snoop()
|
||||
def func(x):
|
||||
return x + 1
|
||||
def test_korean(x):
|
||||
assert func(x) != x+1, '성공!'
|
||||
test_korean(0)
|
||||
14
tests/test_nesting.py
Normal file
14
tests/test_nesting.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import time
|
||||
import pysnooper
|
||||
|
||||
snoop = pysnooper.snoop()
|
||||
|
||||
def test():
|
||||
with snoop:
|
||||
a = 10
|
||||
with snoop:
|
||||
time.sleep(1.0)
|
||||
a = 20
|
||||
time.sleep(1.0)
|
||||
|
||||
test()
|
||||
Loading…
Add table
Add a link
Reference in a new issue