(pytester: Pytester)
| 1590 | |
| 1591 | |
| 1592 | def test_url_property(pytester: Pytester) -> None: |
| 1593 | test_url = class="st">"http://www.github.com/pytest-dev" |
| 1594 | path = pytester.path.joinpath(class="st">"test_url_property.xml") |
| 1595 | log = LogXML(str(path), None) |
| 1596 | |
| 1597 | class Report(BaseReport): |
| 1598 | longrepr = class="st">"FooBarBaz" |
| 1599 | sections: list[tuple[str, str]] = [] |
| 1600 | nodeid = class="st">"something" |
| 1601 | location = class="st">"tests/filename.py", 42, class="st">"TestClass.method" |
| 1602 | url = test_url |
| 1603 | |
| 1604 | test_report = cast(TestReport, Report()) |
| 1605 | |
| 1606 | log.pytest_sessionstart() |
| 1607 | node_reporter = log._opentestcase(test_report) |
| 1608 | node_reporter.append_failure(test_report) |
| 1609 | log.pytest_sessionfinish() |
| 1610 | |
| 1611 | test_case = minidom.parse(str(path)).getElementsByTagName(class="st">"testcase")[0] |
| 1612 | |
| 1613 | assert test_case.getAttribute(class="st">"url") == test_url, ( |
| 1614 | class="st">"The URL did not get written to the xml" |
| 1615 | ) |
| 1616 | |
| 1617 | |
| 1618 | @parametrize_families |
nothing calls this directly
no test coverage detected