(
pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
)
| 1525 | |
| 1526 | @parametrize_families |
| 1527 | def test_record_testsuite_property( |
| 1528 | pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str |
| 1529 | ) -> None: |
| 1530 | pytester.makepyfile( |
| 1531 | """ |
| 1532 | def test_func1(record_testsuite_property): |
| 1533 | record_testsuite_property("stats", "all good") |
| 1534 | |
| 1535 | def test_func2(record_testsuite_property): |
| 1536 | record_testsuite_property("stats", 10) |
| 1537 | """ |
| 1538 | ) |
| 1539 | result, dom = run_and_parse(family=xunit_family) |
| 1540 | assert result.ret == 0 |
| 1541 | node = dom.find_first_by_tag("testsuite") |
| 1542 | properties_node = node.find_first_by_tag("properties") |
| 1543 | p1_node = properties_node.find_nth_by_tag("property", 0) |
| 1544 | p2_node = properties_node.find_nth_by_tag("property", 1) |
| 1545 | p1_node.assert_attr(name="stats", value="all good") |
| 1546 | p2_node.assert_attr(name="stats", value="10") |
| 1547 | |
| 1548 | |
| 1549 | def test_record_testsuite_property_junit_disabled(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected