mirror of https://github.com/cool-RR/PySnooper.git
Don't always place new variables before the modified ones
This commit is contained in:
parent
49f7dd504b
commit
cb280323e5
|
@ -296,9 +296,7 @@ class Tracer:
|
|||
if name not in old_local_reprs:
|
||||
self.write('{indent}{newish_string}{name} = {value_repr}'.format(
|
||||
**locals()))
|
||||
|
||||
for name, value_repr in local_reprs.items():
|
||||
if name in old_local_reprs and old_local_reprs[name] != value_repr:
|
||||
elif old_local_reprs[name] != value_repr:
|
||||
self.write('{indent}Modified var:.. {name} = {value_repr}'.format(
|
||||
**locals()))
|
||||
|
||||
|
|
|
@ -276,8 +276,8 @@ def test_watch_explode():
|
|||
VariableEntry('(lst + [])[2]', '9'),
|
||||
VariableEntry('lst + []'),
|
||||
LineEntry(),
|
||||
VariableEntry('(lst + [])[3]', '10'),
|
||||
VariableEntry('lst'),
|
||||
VariableEntry('(lst + [])[3]', '10'),
|
||||
VariableEntry('lst + []'),
|
||||
ReturnEntry(),
|
||||
ReturnValueEntry('None')
|
||||
|
|
Loading…
Reference in New Issue