issue1035 add test for classes setting __getattr__
This commit is contained in:
parent
1f6988bdec
commit
707226298a
|
@ -95,6 +95,16 @@ class TestClass:
|
||||||
"*1 passed*",
|
"*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:
|
class TestGenerator:
|
||||||
def test_generative_functions(self, testdir):
|
def test_generative_functions(self, testdir):
|
||||||
|
|
Loading…
Reference in New Issue