mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-04-23 03:00:38 -04:00
Fix incorrect tuple passed to variables in test
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user