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

Function test_customized_python_discovery_functions

testing/python/collect.py:1238–1256  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1236
1237
1238def test_customized_python_discovery_functions(pytester: Pytester) -> None:
1239 pytester.makeini(
1240 """
1241 [pytest]
1242 python_functions=_test
1243 """
1244 )
1245 pytester.makepyfile(
1246 """
1247 def _test_underscore():
1248 pass
1249 """
1250 )
1251 result = pytester.runpytest("--collect-only", "-s")
1252 result.stdout.fnmatch_lines(["*_test_underscore*"])
1253
1254 result = pytester.runpytest()
1255 assert result.ret == 0
1256 result.stdout.fnmatch_lines(["*1 passed*"])
1257
1258
1259def test_unorderable_types(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

fnmatch_linesMethod · 0.80
makeiniMethod · 0.45
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected