Author: Romain Guillebert <romain...@gmail.com> Branch: py3k Changeset: r51611:31e2e6510fba Date: 2012-01-21 22:58 +0100 http://bitbucket.org/pypy/pypy/changeset/31e2e6510fba/
Log: Move the kwonly arguments test to the interpreter diff --git a/pypy/interpreter/astcompiler/test/test_compiler.py b/pypy/interpreter/astcompiler/test/test_compiler.py --- a/pypy/interpreter/astcompiler/test/test_compiler.py +++ b/pypy/interpreter/astcompiler/test/test_compiler.py @@ -810,15 +810,6 @@ """ yield self.st, func, "f()", (1, [2, 3, 4], 5) - def test_kwonlyargs_default_parameters(self): - """ This actually test an interpreter bug, but since we can't parse - py3k only code in the interpreter tests right now, it's there waiting - for this feature""" - func = """ def f(a, b, c=3, *, d=4): - return a, b, c, d - """ - yield self.st, func, "f(1, 2)", (1, 2, 3, 4) - class AppTestCompiler: def test_docstring_not_loaded(self): diff --git a/pypy/interpreter/test/test_interpreter.py b/pypy/interpreter/test/test_interpreter.py --- a/pypy/interpreter/test/test_interpreter.py +++ b/pypy/interpreter/test/test_interpreter.py @@ -240,6 +240,12 @@ ''' assert self.codetest(code, 'f', []) == os.name + def test_kwonlyargs_default_parameters(self): + code = """ def f(a, b, c=3, *, d=4): + return a, b, c, d + """ + assert self.codetest(code, "f", [1, 2]) == (1, 2, 3, 4) + class AppTestInterpreter: def test_trivial(self): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit