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

Function test_pytester_subprocess_via_runpytest_arg

testing/test_pytester.py:429–447  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

427
428
429def test_pytester_subprocess_via_runpytest_arg(pytester: Pytester) -> None:
430 testfile = pytester.makepyfile(
431 """
432 def test_pytester_subprocess(pytester):
433 import os
434 testfile = pytester.makepyfile(
435 \"""
436 import os
437 def test_one():
438 assert {} != os.getpid()
439 \""".format(os.getpid())
440 )
441 assert pytester.runpytest(testfile).ret == 0
442 """
443 )
444 result = pytester.runpytest_inprocess(
445 "-p", "pytester", "--runpytest", "subprocess", testfile
446 )
447 assert result.ret == 0
448
449
450def test_unicode_args(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 2

makepyfileMethod · 0.45
runpytest_inprocessMethod · 0.45

Tested by

no test coverage detected