File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 28
28
" print(\" This should be ignored\" )\n " ,
29
29
" \n " ,
30
30
" café = \" καφές\" # Not only ASCII\n " ,
31
+ " other_assignment = b ** 2 # Not recognised as a parameter\n " ,
31
32
" \n " ,
32
33
" def func():\n " ,
33
34
" not_a_parameter = 5 # Should not be found\n " ,
Original file line number Diff line number Diff line change @@ -62,8 +62,9 @@ def test_rebuild(self):
62
62
assert ns ['d' ] == True
63
63
assert ns ['café' ] == "καφές"
64
64
65
- # Function should be preserved
65
+ # Function & non parameter assignment should be preserved
66
66
assert ns ['func' ]() == 0.25
67
+ assert ns ['other_assignment' ] == 21 ** 2
67
68
68
69
def test_rebuild_from_dict (self ):
69
70
new_params = self .param_dict .copy ()
@@ -84,8 +85,9 @@ def test_rebuild_from_dict(self):
84
85
assert ns ['café' ] == "καφές"
85
86
assert ns ['thé' ] == "चाय"
86
87
87
- # Function should be preserved
88
+ # Function & non parameter assignment should be preserved
88
89
assert ns ['func' ]() == 0.75
90
+ assert ns ['other_assignment' ] == 12 ** 2
89
91
90
92
def test_new_values (self ):
91
93
params = code .parameter_values (self .params ,
You can’t perform that action at this time.
0 commit comments