Commit f854cf2f authored by Travis Hance's avatar Travis Hance

improved test case for type __name__

parent 3dbee69b
......@@ -10,3 +10,25 @@ print C
C.__module__ = 1
print C
def set_name(cls, name):
try:
cls.__name__ = name
except Exception as e:
print type(e), e
print cls
def del_name(cls):
try:
del cls.__name__
except Exception as e:
print type(e), e
print cls
set_name(int, "bob")
#TODO implement __del__ for getset descriptors
#del_name(int)
#del_name(C)
set_name(C, 5)
set_name(C, "b\0b")
set_name(C, "car")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment