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

benjamin at codespeak.net benjamin at codespeak.net
Mon Jun 15 00:36:30 CEST 2009


Author: benjamin
Date: Mon Jun 15 00:36:26 2009
New Revision: 65777

Modified:
   pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_astbuilder.py
Log:
test non-default args after default ones

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	Mon Jun 15 00:36:26 2009
@@ -524,6 +524,9 @@
         assert args.defaults[0].ctx is ast.Load
         assert args.vararg == "e"
         assert args.kwarg == "f"
+        input = "def f(a=b, c): pass"
+        exc = py.test.raises(SyntaxError, self.get_ast, input).value
+        assert exc.msg == "non-default argument after default one"
 
     def test_decorator(self):
         func = self.get_first_stmt("@dec\ndef f(): pass")



More information about the Pypy-commit mailing list