Commit b7a3e2dc authored by Travis Hance's avatar Travis Hance

ics test for getset getting and setting

parent f854cf2f
......@@ -23,7 +23,7 @@ def del_name(cls):
del cls.__name__
except Exception as e:
print type(e), e
print cls
print cls.__name__
set_name(int, "bob")
#TODO implement __del__ for getset descriptors
......
# run_args: -n
# statcheck: stats['slowpath_getattr'] <= 10
# statcheck: stats['slowpath_setattr'] <= 10
class C(object):
pass
def f(obj, name):
obj.__name__ = name
print obj.__name__
# pass in a class each time
for i in xrange(1000):
f(C, str(i))
# TODO test guards failing
# I think we need to get a getset descriptor that isn't __name__
# or implement __dict__ to write such a test: otherwise it's impossible
# to actually get our hands on the descriptor object :\
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