issue1035 add test for classes setting __getattr__

This commit is contained in:
TomV 2015-10-07 09:23:46 +01:00
parent 1f6988bdec
commit 707226298a
1 changed files with 10 additions and 0 deletions

View File

@ -95,6 +95,16 @@ class TestClass:
"*1 passed*",
])
def test_issue1035_obj_has_getattr(self, testdir):
modcol = testdir.getmodulecol("""
class Chameleon(object):
def __getattr__(self, name):
return True
chameleon = Chameleon()
""")
colitems = modcol.collect()
assert len(colitems) == 0
class TestGenerator:
def test_generative_functions(self, testdir):