Fix incorrect tuple passed to variables in test

This commit is contained in:
Alex Hall 2019-04-25 21:08:34 +02:00 committed by Ram Rachum
parent d29cd6f464
commit 36b3271f0a

View file

@ -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'),