Skip to content

Commit 68befa8

Browse files
committed
added a few tests for lhs object attr setting
1 parent 95ac1c9 commit 68befa8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/custom_components/pyscript/test_unit_eval.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@
145145
"z = [1,2,3]; ((x, y), (z[2], t)) = ((1, 2), (20, 4)); [x, y, z, t]",
146146
[1, 2, [1, 2, 20], 4],
147147
],
148+
["Foo = type('Foo', (), {'x': 100}); Foo.x = 10; Foo.x", 10],
149+
["Foo = type('Foo', (), {'x': 100}); Foo.x += 10; Foo.x", 110],
150+
["Foo = [type('Foo', (), {'x': 100})]; Foo[0].x = 10; Foo[0].x", 10],
148151
["eval('1+2')", 3],
149152
["x = 5; eval('2 * x')", 10],
150153
["x = 5; exec('x = 2 * x'); x", 10],

0 commit comments

Comments
 (0)