示例#1
0
文件: test_linux.py 项目: blin/zabby
    def test_process_infos_contains_processes_run_by_root(self):
        process_infos = [proc_info
                         for proc_info in self.linux.process_infos()
                         if proc_info.uid == 0]

        # at least init should be here
        assert_less(0, len(process_infos))
示例#2
0
文件: test_linux.py 项目: blin/zabby
    def test_process_infos_contains_processes_run_by_root(self):
        process_infos = [
            proc_info for proc_info in self.linux.process_infos()
            if proc_info.uid == 0
        ]

        # at least init should be here
        assert_less(0, len(process_infos))
示例#3
0
文件: test_utils.py 项目: blin/zabby
    def test_returns_dict(self):
        ensure_contains_only_formatted_lines(FILE_PATH, 'key value')

        d = dict_from_file(FILE_PATH)

        assert_is_instance(d, dict)

        assert_less(0, len(d))
示例#4
0
    def test_returns_dict(self):
        ensure_contains_only_formatted_lines(FILE_PATH, 'key value')

        d = dict_from_file(FILE_PATH)

        assert_is_instance(d, dict)

        assert_less(0, len(d))
示例#5
0
文件: test_cpu.py 项目: blin/zabby
    def test_per_cpu_load_is_smaller_than_total_load(self):
        total_load = cpu.load('all', host_os=self.host_os)
        per_cpu_load = cpu.load('percpu', host_os=self.host_os)

        assert_less(per_cpu_load, total_load)
示例#6
0
文件: test_cpu.py 项目: blin/zabby
    def test_per_cpu_load_is_smaller_than_total_load(self):
        total_load = cpu.load('all', host_os=self.host_os)
        per_cpu_load = cpu.load('percpu', host_os=self.host_os)

        assert_less(per_cpu_load, total_load)