MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / test_time_elapsed

Method test_time_elapsed

dm_control/viewer/util_test.py:261–266  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

259 self.timer = util.Timer()
260
261 def test_time_elapsed(self):
262 with mock.patch(util.__name__ + '.time') as time_mock:
263 time_mock.time.return_value = 1
264 self.timer.tick()
265 time_mock.time.return_value = 2
266 self.assertEqual(1, self.timer.tick())
267
268 def test_time_measurement(self):
269 with mock.patch(util.__name__ + '.time') as time_mock:

Callers

nothing calls this directly

Calls 2

assertEqualMethod · 0.80
tickMethod · 0.45

Tested by

no test coverage detected