[pypy-svn] r9196 - pypy/dist/lib-python-2.3.4/test

ac at codespeak.net ac at codespeak.net
Mon Feb 14 10:21:01 CET 2005


Author: ac
Date: Mon Feb 14 10:21:01 2005
New Revision: 9196

Modified:
   pypy/dist/lib-python-2.3.4/test/pypy_unittest.py
Log:
Work around problem with py.test's raises().

Modified: pypy/dist/lib-python-2.3.4/test/pypy_unittest.py
==============================================================================
--- pypy/dist/lib-python-2.3.4/test/pypy_unittest.py	(original)
+++ pypy/dist/lib-python-2.3.4/test/pypy_unittest.py	Mon Feb 14 10:21:01 2005
@@ -40,7 +40,13 @@
         assert False, msg
         
     def assertRaises(self, exc, call, *args, **kwargs): 
-        raises(exc, call, *args, **kwargs) 
+        # Work around problem with py.test's raises
+        # raises(exc, call, *args, **kwargs) 
+        try:
+            call(*args, **kwargs)
+        except exc:
+            return
+        raise AssertionError('DID NOT RAISE')
 
     def assertAlmostEqual(self, x, y, places=7, msg=None):
         if msg is None:



More information about the Pypy-commit mailing list