[pypy-svn] r68849 - pypy/trunk/pypy/interpreter/test

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Oct 29 16:26:37 CET 2009


Author: cfbolz
Date: Thu Oct 29 16:26:37 2009
New Revision: 68849

Modified:
   pypy/trunk/pypy/interpreter/test/test_function.py
Log:
a test that checks that builtin functions have no __get__


Modified: pypy/trunk/pypy/interpreter/test/test_function.py
==============================================================================
--- pypy/trunk/pypy/interpreter/test/test_function.py	(original)
+++ pypy/trunk/pypy/interpreter/test/test_function.py	Thu Oct 29 16:26:37 2009
@@ -221,6 +221,13 @@
         meth = func.__get__(obj, object)
         assert meth() == obj
 
+    def test_no_get_builtin(self):
+        assert not hasattr(dir, '__get__')
+        class A(object):
+            ord = ord
+        a = A()
+        assert a.ord('a') == 97
+
     def test_call_builtin(self):
         s = 'hello'
         raises(TypeError, len)



More information about the Pypy-commit mailing list