[Python-3000-checkins] r43284 - python/branches/p3yk/Lib/test/test_pep352.py

neal.norwitz python-3000-checkins at python.org
Fri Mar 24 09:08:50 CET 2006


Author: neal.norwitz
Date: Fri Mar 24 09:08:49 2006
New Revision: 43284

Modified:
   python/branches/p3yk/Lib/test/test_pep352.py
Log:
String exceptions are gone and so are classic classes.

Modified: python/branches/p3yk/Lib/test/test_pep352.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_pep352.py	(original)
+++ python/branches/p3yk/Lib/test/test_pep352.py	Fri Mar 24 09:08:49 2006
@@ -120,22 +120,6 @@
     def tearDown(self):
         warnings.filters = self._filters[:]
 
-    def test_raise_classic(self):
-        class ClassicClass:
-            pass
-        try:
-            raise ClassicClass
-        except ClassicClass:
-            pass
-        except:
-            self.fail("unable to raise classic class")
-        try:
-            raise ClassicClass()
-        except ClassicClass:
-            pass
-        except:
-            self.fail("unable to raise class class instance")
-
     def test_raise_new_style_non_exception(self):
         class NewStyleClass(object):
             pass
@@ -152,32 +136,8 @@
         except:
             self.fail("unable to raise new-style class instance")
 
-    def test_raise_string(self):
-        warnings.resetwarnings()
-        warnings.filterwarnings("error")
-        try:
-            raise "spam"
-        except DeprecationWarning:
-            pass
-        except:
-            self.fail("raising a string did not cause a DeprecationWarning")
-
-    def test_catch_string(self):
-        # Test will be pertinent when catching exceptions raises a
-        #   DeprecationWarning
-        warnings.filterwarnings("ignore", "raising")
-        str_exc = "spam"
-        try:
-            raise str_exc
-        except str_exc:
-            pass
-        except:
-            self.fail("catching a string exception failed")
-
 def test_main():
     run_unittest(ExceptionClassTests, UsageTests)
 
-
-
 if __name__ == '__main__':
     test_main()


More information about the Python-3000-checkins mailing list