mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-01-23 10:15:11 +00:00
Fix incorrect tuple passed to variables in test
This commit is contained in:
parent
d29cd6f464
commit
36b3271f0a
1 changed files with 4 additions and 2 deletions
|
|
@ -150,7 +150,7 @@ def test_method_and_prefix():
|
|||
def __init__(self):
|
||||
self.x = 2
|
||||
|
||||
@pysnooper.snoop(variables=('self.x'), prefix='ZZZ')
|
||||
@pysnooper.snoop(variables=('self.x',), prefix='ZZZ')
|
||||
def square(self):
|
||||
foo = 7
|
||||
self.x **= 2
|
||||
|
|
@ -167,11 +167,13 @@ def test_method_and_prefix():
|
|||
assert_output(
|
||||
output,
|
||||
(
|
||||
VariableEntry(prefix='ZZZ'),
|
||||
VariableEntry('self', prefix='ZZZ'),
|
||||
VariableEntry('self.x', '2', prefix='ZZZ'),
|
||||
CallEntry('def square(self):', prefix='ZZZ'),
|
||||
LineEntry('foo = 7', prefix='ZZZ'),
|
||||
VariableEntry('foo', '7', prefix='ZZZ'),
|
||||
LineEntry('self.x **= 2', prefix='ZZZ'),
|
||||
VariableEntry('self.x', '4', prefix='ZZZ'),
|
||||
LineEntry(prefix='ZZZ'),
|
||||
ReturnEntry(prefix='ZZZ'),
|
||||
ReturnValueEntry(prefix='ZZZ'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue