(pytester: Pytester, run_and_parse: RunAndParse)
| 1209 | |
| 1210 | |
| 1211 | def test_record_property(pytester: Pytester, run_and_parse: RunAndParse) -> None: |
| 1212 | pytester.makepyfile( |
| 1213 | """ |
| 1214 | import pytest |
| 1215 | |
| 1216 | @pytest.fixture |
| 1217 | def other(record_property): |
| 1218 | record_property("bar", 1) |
| 1219 | def test_record(record_property, other): |
| 1220 | record_property("foo", "<1"); |
| 1221 | """ |
| 1222 | ) |
| 1223 | result, dom = run_and_parse() |
| 1224 | node = dom.find_first_by_tag("testsuite") |
| 1225 | tnode = node.find_first_by_tag("testcase") |
| 1226 | psnode = tnode.find_first_by_tag("properties") |
| 1227 | pnodes = psnode.find_by_tag("property") |
| 1228 | pnodes[0].assert_attr(name="bar", value="1") |
| 1229 | pnodes[1].assert_attr(name="foo", value="<1") |
| 1230 | result.stdout.fnmatch_lines(["*= 1 passed in *"]) |
| 1231 | |
| 1232 | |
| 1233 | def test_record_property_same_name( |
nothing calls this directly
no test coverage detected