[pypy-svn] r66007 - pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test

benjamin at codespeak.net benjamin at codespeak.net
Sat Jun 27 18:17:33 CEST 2009


Author: benjamin
Date: Sat Jun 27 18:17:32 2009
New Revision: 66007

Modified:
   pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_astbuilder.py
Log:
test target context

Modified: pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_astbuilder.py
==============================================================================
--- pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_astbuilder.py	(original)
+++ pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_astbuilder.py	Sat Jun 27 18:17:32 2009
@@ -1046,6 +1046,7 @@
         assert comp.ifs is None
         assert isinstance(comp.target, ast.Name)
         assert isinstance(comp.iter, ast.Name)
+        assert comp.target.ctx is ast.Store
         gen = self.get_first_expr(brack("x for x in y if w"))
         comp = gen.generators[0]
         assert len(comp.ifs) == 1
@@ -1055,6 +1056,7 @@
         tup = gen.generators[0].target
         assert isinstance(tup, ast.Tuple)
         assert len(tup.elts) == 1
+        assert tup.ctx is ast.Store
         gen = self.get_first_expr(brack("a for w in x for m in p if g"))
         gens = gen.generators
         assert len(gens) == 2



More information about the Pypy-commit mailing list