Implemented a test for xml control character fail.

This commit is contained in:
Jaap Broekhuizen 2013-05-09 21:16:57 +02:00
parent 0e5f2847f1
commit 7803bca335
1 changed files with 13 additions and 0 deletions

View File

@ -450,3 +450,16 @@ def test_logxml_changingdir(testdir):
assert result.ret == 0 assert result.ret == 0
assert testdir.tmpdir.join("a/x.xml").check() assert testdir.tmpdir.join("a/x.xml").check()
def test_escaped_parametrized_names_xml(testdir):
testdir.makepyfile("""
import pytest
@pytest.mark.parametrize('char', ["\\x00"])
def test_func(char):
assert char
""")
result, dom = runandparse(testdir)
assert result.ret == 0
node = dom.getElementsByTagName("testcase")[0]
assert_attr(node,
name="test_func[#x00]")