MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_issue185_time_breaks

Function test_issue185_time_breaks

testing/test_monkeypatch.py:295–310  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

293
294
295def test_issue185_time_breaks(pytester: Pytester) -> None:
296 pytester.makepyfile(
297 """
298 import time
299 def test_m(monkeypatch):
300 def f():
301 raise Exception
302 monkeypatch.setattr(time, "time", f)
303 """
304 )
305 result = pytester.runpytest()
306 result.stdout.fnmatch_lines(
307 """
308 *1 passed*
309 """
310 )
311
312
313def test_importerror(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected