[pypy-svn] r78071 - pypy/branch/fast-forward/pypy/interpreter/test

afa at codespeak.net afa at codespeak.net
Mon Oct 18 21:30:02 CEST 2010


Author: afa
Date: Mon Oct 18 21:29:58 2010
New Revision: 78071

Modified:
   pypy/branch/fast-forward/pypy/interpreter/test/test_raise.py
Log:
Fix tests about string exceptions


Modified: pypy/branch/fast-forward/pypy/interpreter/test/test_raise.py
==============================================================================
--- pypy/branch/fast-forward/pypy/interpreter/test/test_raise.py	(original)
+++ pypy/branch/fast-forward/pypy/interpreter/test/test_raise.py	Mon Oct 18 21:29:58 2010
@@ -4,14 +4,8 @@
     def test_arg_as_string(self):
         def f():
             raise "test"
+        raises(TypeError, f)
 
-        import warnings
-        warnings.simplefilter('error', DeprecationWarning)
-        try:
-            raises(DeprecationWarning, f)
-        finally:
-            warnings.simplefilter('default', DeprecationWarning)
-        
     def test_control_flow(self):
         try:
             raise Exception
@@ -48,17 +42,6 @@
             assert e.args[0] == 1
             assert e.args[1] == 2
 
-    def test_stringexc(self):
-        a = "hello world"
-        try:
-            raise a
-        except a, e:
-            assert e == None
-        try:
-            raise a, "message"
-        except a, e:
-            assert e == "message"
-
     def test_builtin_exc(self):
         try:
             [][0]



More information about the Pypy-commit mailing list