관리-도구
편집 파일: test_misc.cpython-311.pyc
� �܋fZ� � �& � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZ ddl mZ ddl m Z ddl mZ ddlmZ ddlmZ ddlmZ dd lmZ dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ 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* dd lm+Z+ G d!� d"e(� � Z, G d#� d$e(� � Z- G d%� d&e(� � Z. G d'� d(e(� � Z/ ej0 d)d*� � Z1 G d+� d,e(� � Z2 e j3 ej4 �5 e'� � d-� � G d.� d/e(� � � � Z6e7d0k rdd1l8m9Z9 e9e:� � dS dS )2z Miscellaneous tests. � N)�LINUX)�POSIX)�WINDOWS)�bcat)�cat)�debug)� isfile_strict)�memoize)�memoize_when_activated)�parse_environ_block)� supports_ipv6)�wrap_numbers)�PY3)�FileNotFoundError)�redirect_stderr)�APPVEYOR)� CI_TESTING)�HAS_BATTERY)�HAS_MEMORY_MAPS)�HAS_NET_IO_COUNTERS)�HAS_SENSORS_BATTERY)�HAS_SENSORS_FANS)�HAS_SENSORS_TEMPERATURES)� PYTHON_EXE)�PYTHON_EXE_ENV)�SCRIPTS_DIR)�PsutilTestCase)�mock)� reload_module)�shc �f � e Zd Zefd�Zd� Zd� Zd� Zd� Zd� Z d� Z d� Zd � Zd � Z d� Zd� Zd � Zd� ZdS )�TestSpecialMethodsc �8 � t j | � � � j � � } ||� � }| � d|� � | � d|j z |� � | � dt |� � � � � z |� dd� � � � | � d|� � | � d|� � |� � � |� � � ||� � }| � d|� � | � d|� � t j � t j d t j t j � � � � � � � 5 t j � � } ||� � }| � d|j z |� � | � d|� � | � d|� � d d d � � n# 1 swxY w Y t j � t j d t j t j � � � � � � � 5 t j � � } ||� � }| � d|j z |� � | � d |� � | � d|� � d d d � � n# 1 swxY w Y t j � t j d t j t j � � � � � � � 5 t j � � } ||� � }| � d|j z |� � | � d|� � d d d � � d S # 1 swxY w Y d S )Nzpsutil.Processzpid=%sz name='%s'zname=u'zname='zstatus=z exitcode=zstatus='terminated'�name��side_effectzstatus='zombie'zname=� terminated)�psutil�Process�spawn_testproc�pid�assertIn�strr$ �replace�assertNotIn� terminate�waitr �patch�object� ZombieProcess�os�getpid� NoSuchProcess�AccessDenied)�self�func�p�rs �i/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/psutil/tests/test_misc.py�test_process__repr__z'TestSpecialMethods.test_process__repr__? s� � ��N�4�.�.�0�0�4�5�5���D��G�G��� � �&��*�*�*�� � �h���&��*�*�*�� � �k�C������M�M�1��i�i� �8�4�4� 6� 6� 6�� � �i��#�#�#�����a�(�(�(� ��� � � � �������D��G�G��� � �+�Q�/�/�/�� � �k�1�%�%�%� �Z� � �v�~�v�+1�+?�� ���+L�+L� � N� N� )� )��� � �A���Q���A��M�M�(�Q�U�*�A�.�.�.��M�M�+�Q�/�/�/����W�a�(�(�(� )� )� )� )� )� )� )� )� )� )� )���� )� )� )� )� �Z� � �v�~�v�+1�+?�� ���+L�+L� � N� N� )� )��� � �A���Q���A��M�M�(�Q�U�*�A�.�.�.��M�M�,��*�*�*����W�a�(�(�(� )� )� )� )� )� )� )� )� )� )� )���� )� )� )� )� �Z� � �v�~�v�+1�+>�r�y�{�{�+K�+K� � M� M� )� )��� � �A���Q���A��M�M�(�Q�U�*�A�.�.�.����W�a�(�(�(� )� )� )� )� )� )� )� )� )� )� )� )���� )� )� )� )� )� )s9 �A)H�H � H � A)K�K�K�/AN�N�Nc �<