Skip to content

Commit 8f7750e

Browse files
Fix test_type_lookup_mro_reference test because it raises exception while type initialized
- in the old realisation this exception swallowed and this base not checked while finding in mro. so we don't change observed behavior with this change.
1 parent d46f493 commit 8f7750e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_descr.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5236,7 +5236,10 @@ def __hash__(self):
52365236
return hash('mykey')
52375237
52385238
def __eq__(self, other):
5239-
X.__bases__ = (Base2,)
5239+
try:
5240+
X.__bases__ = (Base2,)
5241+
except NameError:
5242+
pass
52405243
52415244
class Base(object):
52425245
mykey = 'from Base'

0 commit comments

Comments
 (0)