Test creating directory for junit-xml and resultlog
This commit is contained in:
parent
1db5c95414
commit
9346e18d8c
|
@ -474,6 +474,15 @@ def test_logxml_changingdir(testdir):
|
|||
assert result.ret == 0
|
||||
assert testdir.tmpdir.join("a/x.xml").check()
|
||||
|
||||
def test_logxml_makedir(testdir):
|
||||
testdir.makepyfile("""
|
||||
def test_pass():
|
||||
pass
|
||||
""")
|
||||
result = testdir.runpytest("--junitxml=path/to/results.xml")
|
||||
assert result.ret == 0
|
||||
assert testdir.tmpdir.join("path/to/results.xml").check()
|
||||
|
||||
def test_escaped_parametrized_names_xml(testdir):
|
||||
testdir.makepyfile("""
|
||||
import pytest
|
||||
|
|
|
@ -180,6 +180,20 @@ def test_generic(testdir, LineMatcher):
|
|||
"x *:test_xfail_norun",
|
||||
])
|
||||
|
||||
def test_makedir_for_resultlog(testdir, LineMatcher):
|
||||
testdir.plugins.append("resultlog")
|
||||
testdir.makepyfile("""
|
||||
import pytest
|
||||
def test_pass():
|
||||
pass
|
||||
""")
|
||||
testdir.runpytest("--resultlog=path/to/result.log")
|
||||
lines = testdir.tmpdir.join("path/to/result.log").readlines(cr=0)
|
||||
LineMatcher(lines).fnmatch_lines([
|
||||
". *:test_pass",
|
||||
])
|
||||
|
||||
|
||||
def test_no_resultlog_on_slaves(testdir):
|
||||
config = testdir.parseconfig("-p", "resultlog", "--resultlog=resultlog")
|
||||
|
||||
|
|
Loading…
Reference in New Issue