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

Method patch

testing/conftest.py:207–212  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

205 return self._current_time
206
207 def patch(self):
208 from _pytest import timing
209
210 monkeypatch.setattr(timing, "sleep", self.sleep)
211 monkeypatch.setattr(timing, "time", self.time)
212 monkeypatch.setattr(timing, "perf_counter", self.time)
213
214 result = MockTiming()
215 result.patch()

Callers 1

mock_timingFunction · 0.95

Calls 1

setattrMethod · 0.80

Tested by

no test coverage detected