mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
Exceptions should inherit from Exception now.
This commit is contained in:
parent
7fbb9d1174
commit
5a822fb720
1 changed files with 2 additions and 2 deletions
|
|
@ -211,7 +211,7 @@ def test_not(self):
|
|||
# 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 @@ def test_coverage(self):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue