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

Function test_via_exec

testing/test_terminal.py:2360–2365  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

2358
2359
2360def test_via_exec(pytester: Pytester) -> None:
2361 p1 = pytester.makepyfile("exec('def test_via_exec(): pass')")
2362 result = pytester.runpytest(str(p1), "-vv")
2363 result.stdout.fnmatch_lines(
2364 ["test_via_exec.py::test_via_exec <- <string> PASSED*", "*= 1 passed in *"]
2365 )
2366
2367
2368class TestCodeHighlight:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected