(pytester: Pytester, run_and_parse: RunAndParse)
| 1267 | |
| 1268 | @pytest.mark.filterwarnings("default") |
| 1269 | def test_record_attribute(pytester: Pytester, run_and_parse: RunAndParse) -> None: |
| 1270 | pytester.makeini( |
| 1271 | """ |
| 1272 | [pytest] |
| 1273 | junit_family = xunit1 |
| 1274 | """ |
| 1275 | ) |
| 1276 | pytester.makepyfile( |
| 1277 | """ |
| 1278 | import pytest |
| 1279 | |
| 1280 | @pytest.fixture |
| 1281 | def other(record_xml_attribute): |
| 1282 | record_xml_attribute("bar", 1) |
| 1283 | def test_record(record_xml_attribute, other): |
| 1284 | record_xml_attribute("foo", "<1"); |
| 1285 | """ |
| 1286 | ) |
| 1287 | result, dom = run_and_parse() |
| 1288 | node = dom.find_first_by_tag("testsuite") |
| 1289 | tnode = node.find_first_by_tag("testcase") |
| 1290 | tnode.assert_attr(bar="1") |
| 1291 | tnode.assert_attr(foo="<1") |
| 1292 | result.stdout.fnmatch_lines( |
| 1293 | ["*test_record_attribute.py:6:*record_xml_attribute is an experimental feature"] |
| 1294 | ) |
| 1295 | |
| 1296 | |
| 1297 | @pytest.mark.filterwarnings("default") |
nothing calls this directly
no test coverage detected