관리-도구
편집 파일: test_system.cpython-311.pyc
� �܋fP� � �� � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlZddl Z ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ dd l mZ dd l mZ ddl mZ ddl mZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" ddlm#Z# ddlm$Z$ ddlm%Z% ddlm&Z& ddlm'Z' ddlm(Z( ddlm)Z) ddlm*Z* ddlm+Z+ ddlm,Z, dd lm-Z- dd!lm.Z. dd"lm/Z/ dd#lm0Z0 G d$� d%e,� � Z1 G d&� d'e,� � Z2 G d(� d)e,� � Z3 G d*� d+e,� � Z4 G d,� d-e,� � Z5 G d.� d/e,� � Z6 G d0� d1e,� � Z7e8d2k rdd3l9m:Z: e:e;� � dS dS )4zTests for system APIS.� N)�AIX)�BSD)�FREEBSD)�LINUX)�MACOS)�NETBSD)�OPENBSD)�POSIX)�SUNOS)�WINDOWS)�FileNotFoundError)�long)�ASCII_FS)� CI_TESTING)�DEVNULL)�GITHUB_ACTIONS)�GLOBAL_TIMEOUT)�HAS_BATTERY)�HAS_CPU_FREQ)�HAS_GETLOADAVG)�HAS_NET_IO_COUNTERS)�HAS_SENSORS_BATTERY)�HAS_SENSORS_FANS)�HAS_SENSORS_TEMPERATURES)�IS_64BIT)�MACOS_12PLUS)�PYPY)�UNICODE_SUFFIX)�PsutilTestCase)�check_net_address)�enum)�mock)�retry_on_failurec � � e Zd Zd� Zd� Z ej eoed� � d� � � Z ej eoed� � d� � � Z d� Zd� ZdS ) �TestProcessAPIsc �h � | � t j � � d� t j � � D � � � � | � � � }| � |j d� t j � � D � � � � t j |j � � }|� � � |� � � | � |j d� t j � � D � � � � t j dt j t j � � � � �� � 5 | � t t j � � � � g � � d d d � � n# 1 swxY w Y t j dt j t j � � � � �� � 5 | � t j � � 5 t t j � � � � d d d � � n# 1 swxY w Y d d d � � d S # 1 swxY w Y d S )Nc � � g | ] }|j �� S � ��pid��.0�xs �k/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/psutil/tests/test_system.py� <listcomp>z5TestProcessAPIs.test_process_iter.<locals>.<listcomp>B s � �#I�#I�#I�a�A�E�#I�#I�#I� c � � g | ] }|j �� S r( r) r+ s r. r/ z5TestProcessAPIs.test_process_iter.<locals>.<listcomp>D s � �!G�!G�!G�A�!�%�!G�!G�!Gr0 c � � g | ] }|j �� S r( r) r+ s r. r/ z5TestProcessAPIs.test_process_iter.<locals>.<listcomp>H s � �$J�$J�$J�q�Q�U�$J�$J�$Jr0 zpsutil.Process��side_effect)�assertIn�os�getpid�psutil�process_iter�spawn_testprocr* �Process�kill�wait�assertNotInr"