def test_returns_up_to_maximum_number_of_lines(self): ensure_contains_only_formatted_lines(FILE_PATH, 'line', 3) maximum_number_of_lines = 2 found_lines = lines_from_file(FILE_PATH, maximum_number_of_lines) assert_less_equal(maximum_number_of_lines, len(found_lines))
def test_returns_not_completely_shifted_stats_for_unfilled_history(self): self.collector._collect() stats, timestamp = self.collector.get_stats(DEVICE_NAME, self.shift, self.current_time) assert_less_equal(self.shift, self.current_time - timestamp) assert_is_instance(stats, DiskDeviceStats)
def test_result_for_all_is_greater_than_for_single_device(self): results = list() devices = self.host_os.disk_device_names() for device in devices: result = self.function_under_test(device=device, host_os=self.host_os) results.append(result) all_result = self.function_under_test(device='all', host_os=self.host_os) for result in results: assert_less_equal(result, all_result)
def test_fs_inodes_returns_tuple_of_integers_one_less_than_other(self): free, total = self.linux.fs_inodes(PRESENT_FILESYSTEM) assert_less_equal(free, total)
def test_swap_size(self): free, total = self.linux.swap_size('all') assert_less_equal(free, total)