Skip to content

Commit d3919f5

Browse files
committed
GR-8488: re-enable unittest for locals() not polluting the class ns with free vars that pass through
1 parent c234af6 commit d3919f5

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_scope.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -589,20 +589,18 @@ def m(self):
589589

590590
assert f(1).x == 12
591591

592-
# TODO: see GR-8488
593-
# def test_locals_class2():
594-
# def f(x):
595-
# class C:
596-
# y = x
597-
#
598-
# def m(self):
599-
# return x
600-
# z = list(locals())
601-
# return C
602-
#
603-
# varnames = f(1).z
604-
# assert "x" not in varnames
605-
# assert "y" in varnames
592+
def f(x):
593+
class C:
594+
y = x
595+
596+
def m(self):
597+
return x
598+
z = list(locals())
599+
return C
600+
601+
varnames = f(1).z
602+
assert "x" not in varnames
603+
assert "y" in varnames
606604

607605

608606
def test_bound_and_free():

0 commit comments

Comments
 (0)