psutil.tests.test_process

Tests for psutil.Process class.

Module Contents

class TestProcess

Bases:psutil.tests.unittest.TestCase

Tests for psutil.Process class.

setUp(self)
tearDown(self)
test_pid(self)
test_kill(self)
test_terminate(self)
test_send_signal(self)
test_wait(self)
test_wait_non_children(self)
test_wait_timeout_0(self)
test_cpu_percent(self)
test_cpu_percent_numcpus_none(self)
test_cpu_times(self)
test_cpu_times_2(self)
test_cpu_num(self)
test_create_time(self)
test_terminal(self)
test_io_counters(self)
test_ionice(self)
test_ionice_errs(self)
test_rlimit_get(self)
test_rlimit_set(self)
test_rlimit(self)
test_rlimit_infinity(self)
test_rlimit_infinity_value(self)
test_num_threads(self)
test_num_handles(self)
test_threads(self)
test_threads_2(self)
test_memory_info(self)
test_memory_full_info(self)
test_memory_maps(self)
test_memory_maps_lists_lib(self)
test_memory_percent(self)
test_is_running(self)
test_exe(self)
test_cmdline(self)
test_name(self)
test_prog_w_funky_name(self)
test_uids(self)
test_gids(self)
test_nice(self)
test_status(self)
test_username(self)
test_cwd(self)
test_cwd_2(self)
test_cpu_affinity(self)
test_cpu_affinity_errs(self)
test_cpu_affinity_all_combinations(self)
test_open_files(self)
test_open_files_2(self)
test_num_fds(self)
test_num_ctx_switches(self)
test_ppid(self)
test_parent(self)
test_parent_multi(self)
test_parent_disappeared(self)
test_parents(self)
test_children(self)
test_children_recursive(self)
test_children_duplicates(self)
test_parents_and_children(self)
test_suspend_resume(self)
test_invalid_pid(self)
test_as_dict(self)
test_oneshot(self)
test_oneshot_twice(self)
test_oneshot_cache(self)
test_halfway_terminated_process(self)
test_zombie_process(self)
test_zombie_process_is_running_w_exc(self)
test_zombie_process_status_w_exc(self)
test_pid_0(self)
test_environ(self)
test_weird_environ(self)
class LimitedUserTestCase(*args, **kwargs)

Bases:psutil.tests.test_process.TestProcess

Repeat the previous tests by using a limited user. Executed only on UNIX and only if the user who run the test script is root.

PROCESS_UID
setUp(self)
tearDown(self)
test_nice(self)
test_zombie_process(self)
class TestPopen

Bases:psutil.tests.unittest.TestCase

Tests for psutil.Popen class.

tearDown(self)
test_misc(self)
test_ctx_manager(self)
test_kill_terminate(self)