(
self, pytester: Pytester, run_and_parse: RunAndParse, mock_timing
)
| 226 | assert start_time <= timestamp < datetime.now() |
| 227 | |
| 228 | def test_timing_function( |
| 229 | self, pytester: Pytester, run_and_parse: RunAndParse, mock_timing |
| 230 | ) -> None: |
| 231 | pytester.makepyfile( |
| 232 | """ |
| 233 | from _pytest import timing |
| 234 | def setup_module(): |
| 235 | timing.sleep(1) |
| 236 | def teardown_module(): |
| 237 | timing.sleep(2) |
| 238 | def test_sleep(): |
| 239 | timing.sleep(4) |
| 240 | """ |
| 241 | ) |
| 242 | result, dom = run_and_parse() |
| 243 | node = dom.find_first_by_tag("testsuite") |
| 244 | tnode = node.find_first_by_tag("testcase") |
| 245 | val = tnode["time"] |
| 246 | assert float(val) == 7.0 |
| 247 | |
| 248 | @pytest.mark.parametrize("duration_report", ["call", "total"]) |
| 249 | def test_junit_duration_report( |
nothing calls this directly
no test coverage detected