[pypy-svn] r60983 - pypy/trunk/pypy/objspace/std/test

fijal at codespeak.net fijal at codespeak.net
Thu Jan 15 00:03:21 CET 2009


Author: fijal
Date: Thu Jan 15 00:03:20 2009
New Revision: 60983

Modified:
   pypy/trunk/pypy/objspace/std/test/test_userobject.py
Log:
a failing test for oldstyle classes


Modified: pypy/trunk/pypy/objspace/std/test/test_userobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/test/test_userobject.py	(original)
+++ pypy/trunk/pypy/objspace/std/test/test_userobject.py	Thu Jan 15 00:03:20 2009
@@ -207,6 +207,36 @@
         s = repr(Foo())
         assert s.startswith('<a.b.c.Foo object at ')
 
+    def test_del_attr(self):
+        skip("Fails")
+        class Foo(object):
+            def __init__(self):
+                self.x = 3
+
+        foo = Foo()
+        del foo.x
+
+        try:
+            del foo.x
+        except AttributeError:
+            pass
+        else:
+            raise Exception("DID NOT RAISE")
+
+        class Foo:
+            def __init__(self):
+                self.x = 3
+
+        foo = Foo()
+        del foo.x
+
+        try:
+            del foo.x
+        except AttributeError:
+            pass
+        else:
+            raise Exception("DID NOT RAISE")
+
 class AppTestWithMultiMethodVersion2(AppTestUserObject):
     OPTIONS = {}    # for test_builtinshortcut.py
 



More information about the Pypy-commit mailing list