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

Function test_pytest_cmdline_main

testing/test_runner.py:780–795  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

778
779
780def test_pytest_cmdline_main(pytester: Pytester) -> None:
781 p = pytester.makepyfile(
782 """
783 import pytest
784 def test_hello():
785 assert 1
786 if __name__ == '__main__':
787 pytest.cmdline.main([__file__])
788 """
789 )
790 import subprocess
791
792 popen = subprocess.Popen([sys.executable, str(p)], stdout=subprocess.PIPE)
793 popen.communicate()
794 ret = popen.wait()
795 assert ret == 0
796
797
798def test_unicode_in_longrepr(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 1

makepyfileMethod · 0.45

Tested by

no test coverage detected