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

Function test_logxml_changingdir

testing/test_junitxml.py:1094–1105  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1092
1093
1094def test_logxml_changingdir(pytester: Pytester) -> None:
1095 pytester.makepyfile(
1096 """
1097 def test_func():
1098 import os
1099 os.chdir("a")
1100 """
1101 )
1102 pytester.mkdir("a")
1103 result = pytester.runpytest("--junitxml=a/x.xml")
1104 assert result.ret == 0
1105 assert pytester.path.joinpath("a/x.xml").exists()
1106
1107
1108def test_logxml_makedir(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

makepyfileMethod · 0.45
mkdirMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected