From 7803bca335646df1e4155fa9e5464e193d16b466 Mon Sep 17 00:00:00 2001 From: Jaap Broekhuizen Date: Thu, 9 May 2013 21:16:57 +0200 Subject: [PATCH] Implemented a test for xml control character fail. --- testing/test_junitxml.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/testing/test_junitxml.py b/testing/test_junitxml.py index dbb814961..139ba50e5 100644 --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -450,3 +450,16 @@ def test_logxml_changingdir(testdir): assert result.ret == 0 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]") +