From 04e9ae75c80e877fea6d3f25694109799c000c2e Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Tue, 24 Nov 2015 21:24:15 +0100 Subject: [PATCH] add xfailing test for double test id failure --- testing/test_junitxml.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/testing/test_junitxml.py b/testing/test_junitxml.py index 1ffe91343..9ee6824c3 100644 --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -659,3 +659,14 @@ def test_random_report_log_xdist(testdir): failed.append(case_node['name']) assert failed == ['test_x[22]'] + + +@pytest.mark.xfail(reason='duplicate test ids kill us') +def test_runs_twice(testdir): + f = testdir.makepyfile(''' + def test_pass(): + pass + ''') + + result = testdir.runpytest(f, f, '--junitxml', testdir.tmpdir.join("test.xml")) + assert 'INTERNALERROR' not in result.stdout \ No newline at end of file