Skip to content

Commit bbe82fa

Browse files
fix bad merge
1 parent 786b335 commit bbe82fa

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

Lib/test/test_symtable.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -501,27 +501,6 @@ def test__symtable_refleak(self):
501501
self.assertRaises(TypeError, symtable.symtable, '', mortal_str, 1)
502502

503503

504-
class ComprehensionTests(unittest.TestCase):
505-
def get_identifiers_recursive(self, st, res):
506-
res.extend(st.get_identifiers())
507-
for ch in st.get_children():
508-
self.get_identifiers_recursive(ch, res)
509-
510-
def test_loopvar_in_only_one_scope(self):
511-
# ensure that the loop variable appears only once in the symtable
512-
comps = [
513-
"[x for x in [1]]",
514-
"{x for x in [1]}",
515-
"{x:x*x for x in [1]}",
516-
]
517-
for comp in comps:
518-
with self.subTest(comp=comp):
519-
st = symtable.symtable(comp, "?", "exec")
520-
ids = []
521-
self.get_identifiers_recursive(st, ids)
522-
self.assertEqual(len([x for x in ids if x == 'x']), 1)
523-
524-
525504
class CommandLineTest(unittest.TestCase):
526505
maxDiff = None
527506

0 commit comments

Comments
 (0)