Commit ac511d83 authored by Vitja Makarov's avatar Vitja Makarov

Add testcase for ticket #593

parent a68962a4
......@@ -18,6 +18,7 @@ ipow_crash_T562
pure_mode_cmethod_inheritance_T583
genexpr_iterable_lookup_T600
for_from_pyvar_loop_T601
decorators_T593
# CPython regression tests that don't current work:
pyregr.test_threadsignals
......
"""
>>> am_i_buggy
False
>>> Foo
False
"""
def testme(func):
try:
am_i_buggy
return True
except NameError:
return False
@testme
def am_i_buggy():
pass
def testclass(klass):
try:
Foo
return True
except NameError:
return False
@testclass
class Foo:
pass
class ODict(dict):
def __init__(self):
dict.__init__(self)
self._order = []
dict.__setitem__(self, '_order', self._order)
def __setitem__(self, key, value):
dict.__setitem__(self, key, value)
self._order.append(key)
class Base(type):
@staticmethod
def __prepare__(*args, **kwargs):
return ODict()
class Bar(metaclass=Base):
"""
>>> Bar._order
['__module__', '__doc__', 'bar']
"""
@property
def bar(self):
return 0
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