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

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):