You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
18 lines
477 B
Python
18 lines
477 B
Python
# From 2.4 test_binop.py bug is missing 'else:' in 2nd try.
|
|
def test_constructor():
|
|
for bad in "0", 0.0, 0j, (), [], {}, None:
|
|
try:
|
|
raise TypeError(bad)
|
|
except TypeError:
|
|
pass
|
|
else:
|
|
assert False, "%r didn't raise TypeError" % bad
|
|
try:
|
|
raise TypeError(bad)
|
|
except TypeError:
|
|
pass
|
|
else:
|
|
assert False, "%r didn't raise TypeError" % bad
|
|
|
|
test_constructor()
|