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

Method test_issue1579_namedtuple

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

Source from the content-addressed store, hash-verified

237 assert len(colitems) == 0
238
239 def test_issue1579_namedtuple(self, pytester: Pytester) -> None:
240 pytester.makepyfile(
241 """
242 import collections
243
244 TestCase = collections.namedtuple('TestCase', ['a'])
245 """
246 )
247 result = pytester.runpytest()
248 result.stdout.fnmatch_lines(
249 "*cannot collect test class 'TestCase' "
250 "because it has a __new__ constructor*"
251 )
252
253 def test_issue2234_property(self, pytester: Pytester) -> None:
254 pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected