]> granicus.if.org Git - python/commitdiff
Exceptions should inherit from Exception now.
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 24 Mar 2006 07:03:44 +0000 (07:03 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 24 Mar 2006 07:03:44 +0000 (07:03 +0000)
Lib/test/test_richcmp.py

index 687298d26e50cfa78ef1d096817423a489c1c539..f412a89055cdb117b19f2215632e9d2c1bb7c3d3 100644 (file)
@@ -211,7 +211,7 @@ class MiscTest(unittest.TestCase):
         # Check that exceptions in __nonzero__ are properly
         # propagated by the not operator
         import operator
-        class Exc:
+        class Exc(Exception):
             pass
         class Bad:
             def __nonzero__(self):
@@ -305,7 +305,7 @@ class ListTest(unittest.TestCase):
     def test_badentry(self):
         # make sure that exceptions for item comparison are properly
         # propagated in list comparisons
-        class Exc:
+        class Exc(Exception):
             pass
         class Bad:
             def __eq__(self, other):