MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_issue1035_obj_has_getattr

Method test_issue1035_obj_has_getattr

testing/python/collect.py:227–237  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

225 result.stdout.fnmatch_lines(["*1 passed*"])
226
227 def test_issue1035_obj_has_getattr(self, pytester: Pytester) -> None:
228 modcol = pytester.getmodulecol(
229 """
230 class Chameleon(object):
231 def __getattr__(self, name):
232 return True
233 chameleon = Chameleon()
234 """
235 )
236 colitems = modcol.collect()
237 assert len(colitems) == 0
238
239 def test_issue1579_namedtuple(self, pytester: Pytester) -> None:
240 pytester.makepyfile(

Callers

nothing calls this directly

Calls 2

getmodulecolMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected