def test_nice_time_if_previous_value_is_none(self): cpu_util = CoreCpuUtil(1, 1.34, self.__metric_repository) nice_time = cpu_util.nice_time() self.assertIsNone(nice_time)
def test_nice_time_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) nice_time = cpu_util.nice_time() self.assertEqual(nice_time, 0.3)
def test_nice_time(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) nice_time = cpu_util.nice_time() self.assertEqual(nice_time, 0.6)
def test_nice_time_for_all_cpus(self): cpu_util = CoreCpuUtil(None, 1.34, self.__metric_repository) nice_time = cpu_util.nice_time() self.assertEqual(nice_time,0.3)
def test_nice_time(self): cpu_util = CoreCpuUtil(0, 1.34, self.__metric_repository) nice_time = cpu_util.nice_time() self.assertEqual(nice_time,0.6)