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
275
275
Marc Mueller
276
276
Marc Schlaich
277
277
Marcelo Duarte Trevisani
278
+ Marcin Augustynów
278
279
Marcin Bachry
279
280
Marc Bresson
280
281
Marco 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:
670
670
for node_reporter in self .node_reporters_ordered :
671
671
suite_node .append (node_reporter .to_xml ())
672
672
testsuites = ET .Element ("testsuites" )
673
+ testsuites .set ("name" , "pytest tests" )
673
674
testsuites .append (suite_node )
674
675
logfile .write (ET .tostring (testsuites , encoding = "unicode" ))
675
676
Original file line number Diff line number Diff line change @@ -1451,6 +1451,7 @@ def test_x():
1451
1451
_ , dom = run_and_parse (family = xunit_family )
1452
1452
root = dom .get_unique_child
1453
1453
assert root .tag == "testsuites"
1454
+ root .assert_attr (name = "pytest tests" )
1454
1455
suite_node = root .get_unique_child
1455
1456
assert suite_node .tag == "testsuite"
1456
1457
You can’t perform that action at this time.
0 commit comments