관리-도구
편집 파일: test_osx.cpython-311.pyc
� �܋f� � � � d Z ddlZddlZddlZddlZddlZddlmZ ddlmZ ddlm Z ddlm Z ddlmZ ddlmZ dd lm Z dd lmZ ddlmZ ddlmZ erdd lmZ d� Zd� Z ej e d� � G d� de� � � � Z ej e d� � G d� de� � � � Zedk rddlmZ ee� � dS dS )zmacOS specific tests.� N)�MACOS)�POSIX)�HAS_BATTERY)�TOLERANCE_DISK_USAGE)�TOLERANCE_SYS_MEM)�PsutilTestCase)�retry_on_failure)�sh)�spawn_testproc)� terminate)�getpagesizec � � t | � � }|� � � d } t |� � S # t $ r |cY S w xY w)zmExpects a sysctl command with an argument and parse the result returning only the value of interest. � )r �split�int� ValueError)�cmdline�out�results �h/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/psutil/tests/test_osx.py�sysctlr sU � � �W�+�+�C� �Y�Y�[�[��^�F���6�{�{���� � � �� � � ����s �: �A �A c � � t d� � }|� d� � D ]}| |v r n� t d� � �t t j d|� � � d� � � � t � � z S )z)Wrapper around 'vm_stat' cmdline utility.�vm_stat� zline not foundz\d+r )r r r r �re�search�groupr )�fieldr �lines r r r + s{ � � �Y�-�-�C�� � �$��� +� +���D�=�=��E� � �)�*�*�*��r�y���&�&�,�,�Q�/�/�0�0�;�=�=�@�@� z MACOS onlyc �@ � e Zd Zed� � � Zed� � � Zd� ZdS )�TestProcessc �6 � t � � j | _ d S �N)r �pid��clss r � setUpClasszTestProcess.setUpClass9 s � � �"�"�&����r c �. � t | j � � d S r$ )r r% r&