[pypy-svn] r8720 - pypy/dist/pypy/lib/test2

arigo at codespeak.net arigo at codespeak.net
Sat Jan 29 16:01:13 CET 2005


Author: arigo
Date: Sat Jan 29 16:01:13 2005
New Revision: 8720

Added:
   pypy/dist/pypy/lib/test2/test_funcattrs.py
      - copied, changed from r8714, pypy/dist/lib-python-2.3.4/test/test_funcattrs.py
Log:
copied, modified from CPython.

Copied: pypy/dist/pypy/lib/test2/test_funcattrs.py (from r8714, pypy/dist/lib-python-2.3.4/test/test_funcattrs.py)
==============================================================================
--- pypy/dist/lib-python-2.3.4/test/test_funcattrs.py	(original)
+++ pypy/dist/pypy/lib/test2/test_funcattrs.py	Sat Jan 29 16:01:13 2005
@@ -36,8 +36,8 @@
 
 try:
     del b.__dict__
-except TypeError: pass
-else: raise TestFailed, 'del func.__dict__ expected TypeError'
+except (AttributeError, TypeError): pass
+else: raise TestFailed, 'expected AttributeError or TypeError'
 
 b.publish = 1
 try:
@@ -175,13 +175,13 @@
 
 try:
     del another.__dict__
-except TypeError: pass
-else: raise TestFailed
+except (TypeError, AttributeError): pass
+else: raise TestFailed, 'del another.__dict__ did not fail'
 
 try:
     del another.func_dict
-except TypeError: pass
-else: raise TestFailed
+except (TypeError, AttributeError): pass
+else: raise TestFailed, 'del another.func_dict did not fail'
 
 try:
     another.func_dict = None



More information about the Pypy-commit mailing list