Merge pull request #1432 from tomviner/issue469-junit-double-colon
issue469: junit parsing nodeid, add method test
This commit is contained in:
commit
c8ca1d12d7
|
@ -5,11 +5,15 @@
|
||||||
|
|
||||||
*
|
*
|
||||||
|
|
||||||
* Fix (`#469`_): junit parses report.nodeid incorrectly, when params contain
|
* Fix (`#469`_): junit parses report.nodeid incorrectly, when params IDs
|
||||||
``::``.
|
contain ``::``. Thanks `@tomviner`_ for the PR (`#1431`_).
|
||||||
|
|
||||||
*
|
*
|
||||||
|
|
||||||
|
.. _#469: https://github.com/pytest-dev/pytest/issues/469
|
||||||
|
.. _#1431: https://github.com/pytest-dev/pytest/pull/1431
|
||||||
|
|
||||||
|
|
||||||
2.9.0
|
2.9.0
|
||||||
=====
|
=====
|
||||||
|
|
||||||
|
@ -103,7 +107,6 @@
|
||||||
|
|
||||||
.. _`traceback style docs`: https://pytest.org/latest/usage.html#modifying-python-traceback-printing
|
.. _`traceback style docs`: https://pytest.org/latest/usage.html#modifying-python-traceback-printing
|
||||||
|
|
||||||
.. _#469: https://github.com/pytest-dev/pytest/issues/469
|
|
||||||
.. _#1422: https://github.com/pytest-dev/pytest/issues/1422
|
.. _#1422: https://github.com/pytest-dev/pytest/issues/1422
|
||||||
.. _#1379: https://github.com/pytest-dev/pytest/issues/1379
|
.. _#1379: https://github.com/pytest-dev/pytest/issues/1379
|
||||||
.. _#1366: https://github.com/pytest-dev/pytest/issues/1366
|
.. _#1366: https://github.com/pytest-dev/pytest/issues/1366
|
||||||
|
|
|
@ -620,7 +620,7 @@ def test_escaped_parametrized_names_xml(testdir):
|
||||||
node.assert_attr(name="test_func[#x00]")
|
node.assert_attr(name="test_func[#x00]")
|
||||||
|
|
||||||
|
|
||||||
def test_double_colon_split_issue469(testdir):
|
def test_double_colon_split_function_issue469(testdir):
|
||||||
testdir.makepyfile("""
|
testdir.makepyfile("""
|
||||||
import pytest
|
import pytest
|
||||||
@pytest.mark.parametrize('param', ["double::colon"])
|
@pytest.mark.parametrize('param', ["double::colon"])
|
||||||
|
@ -630,7 +630,23 @@ def test_double_colon_split_issue469(testdir):
|
||||||
result, dom = runandparse(testdir)
|
result, dom = runandparse(testdir)
|
||||||
assert result.ret == 0
|
assert result.ret == 0
|
||||||
node = dom.find_first_by_tag("testcase")
|
node = dom.find_first_by_tag("testcase")
|
||||||
node.assert_attr(classname="test_double_colon_split_issue469")
|
node.assert_attr(classname="test_double_colon_split_function_issue469")
|
||||||
|
node.assert_attr(name='test_func[double::colon]')
|
||||||
|
|
||||||
|
|
||||||
|
def test_double_colon_split_method_issue469(testdir):
|
||||||
|
testdir.makepyfile("""
|
||||||
|
import pytest
|
||||||
|
class TestClass:
|
||||||
|
@pytest.mark.parametrize('param', ["double::colon"])
|
||||||
|
def test_func(self, param):
|
||||||
|
pass
|
||||||
|
""")
|
||||||
|
result, dom = runandparse(testdir)
|
||||||
|
assert result.ret == 0
|
||||||
|
node = dom.find_first_by_tag("testcase")
|
||||||
|
node.assert_attr(
|
||||||
|
classname="test_double_colon_split_method_issue469.TestClass")
|
||||||
node.assert_attr(name='test_func[double::colon]')
|
node.assert_attr(name='test_func[double::colon]')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue