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

Method test_time_measurement

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

Source from the content-addressed store, hash-verified

266 self.assertEqual(1, self.timer.tick())
267
268 def test_time_measurement(self):
269 with mock.patch(util.__name__ + '.time') as time_mock:
270 time_mock.time.return_value = 1
271 with self.timer.measure_time():
272 time_mock.time.return_value = 4
273 self.assertEqual(3, self.timer.measured_time)
274
275
276class ErrorLoggerTest(absltest.TestCase):

Callers

nothing calls this directly

Calls 2

measure_timeMethod · 0.80
assertEqualMethod · 0.80

Tested by

no test coverage detected