File tree Expand file tree Collapse file tree 4 files changed +6
-0
lines changed Expand file tree Collapse file tree 4 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ Manuel Krebber
275275Marc Mueller
276276Marc Schlaich
277277Marcelo Duarte Trevisani
278+ Marcin Augustynów
278279Marcin Bachry
279280Marc Bresson
280281Marco Gorelli
Original file line number Diff line number Diff line change 1+ Added a new attribute `name ` with the fixed value `"pytest tests" ` to the root tag `testsuites ` of the junit-xml generated by pytest.
2+
3+ This attribute is part of many junit-xml specifications and is even part of the `junit-10.xsd ` specification that pytest's implementation is based on.
Original file line number Diff line number Diff line change @@ -670,6 +670,7 @@ def pytest_sessionfinish(self) -> None:
670670 for node_reporter in self .node_reporters_ordered :
671671 suite_node .append (node_reporter .to_xml ())
672672 testsuites = ET .Element ("testsuites" )
673+ testsuites .set ("name" , "pytest tests" )
673674 testsuites .append (suite_node )
674675 logfile .write (ET .tostring (testsuites , encoding = "unicode" ))
675676
Original file line number Diff line number Diff line change @@ -1451,6 +1451,7 @@ def test_x():
14511451 _ , dom = run_and_parse (family = xunit_family )
14521452 root = dom .get_unique_child
14531453 assert root .tag == "testsuites"
1454+ root .assert_attr (name = "pytest tests" )
14541455 suite_node = root .get_unique_child
14551456 assert suite_node .tag == "testsuite"
14561457
You can’t perform that action at this time.
0 commit comments