def test_idle_time_if_previous_value_is_none(self): cpu_util = CoreCpuUtil(1, 1.34, self.__metric_repository) idle_time = cpu_util.idle_time() self.assertIsNone(idle_time)
def test_idle_time_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) idle_time = cpu_util.idle_time() self.assertEqual(idle_time, 0.11)
def test_idle_time(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) idle_time = cpu_util.idle_time() self.assertEqual(idle_time, 0.22)
def test_idle_time_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) idle_time = cpu_util.idle_time() self.assertEqual(idle_time,0.11)
def test_idle_time(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) idle_time = cpu_util.idle_time() self.assertEqual(idle_time,0.22)