[pypy-svn] r5292 - pypy/trunk/src/pypy/interpreter/test

arigo at codespeak.net arigo at codespeak.net
Fri Jun 25 14:34:33 CEST 2004


Author: arigo
Date: Fri Jun 25 14:34:32 2004
New Revision: 5292

Modified:
   pypy/trunk/src/pypy/interpreter/test/test_function.py
Log:
Uh oh.  There is a problem with the ** arguments passed all around,
as shown by this failing test...


Modified: pypy/trunk/src/pypy/interpreter/test/test_function.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/test/test_function.py	(original)
+++ pypy/trunk/src/pypy/interpreter/test/test_function.py	Fri Jun 25 14:34:32 2004
@@ -123,6 +123,12 @@
             return arg1, kw
         self.assertRaises(TypeError, func, 42, **{'arg1': 23})
 
+    def test_kwargs_confusing_name(self):
+        def func(self):    # 'self' conflicts with the interp-level
+            return self*7  # argument to call_function()
+        res = func(self=6)
+        self.assertEquals(res, 42)
+
 
 class TestMethod(testit.IntTestCase):
     def setUp(self):



More information about the Pypy-commit mailing list