(
self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
)
| 211 | |
| 212 | @parametrize_families |
| 213 | def test_timestamp_in_xml( |
| 214 | self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str |
| 215 | ) -> None: |
| 216 | pytester.makepyfile( |
| 217 | """ |
| 218 | def test_pass(): |
| 219 | pass |
| 220 | """ |
| 221 | ) |
| 222 | start_time = datetime.now() |
| 223 | result, dom = run_and_parse(family=xunit_family) |
| 224 | node = dom.find_first_by_tag("testsuite") |
| 225 | timestamp = datetime.strptime(node["timestamp"], "%Y-%m-%dT%H:%M:%S.%f") |
| 226 | assert start_time <= timestamp < datetime.now() |
| 227 | |
| 228 | def test_timing_function( |
| 229 | self, pytester: Pytester, run_and_parse: RunAndParse, mock_timing |
nothing calls this directly
no test coverage detected