관리-도구
편집 파일: test_osx.cpython-311.pyc
� P�Dg~ � �v � d Z ddlZddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm Z dd lmZ dd lmZ ddlm Z ddlmZ d � Zd� 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)�HAS_BATTERY)�PsutilTestCase)�retry_on_failure)�sh)�spawn_testproc)� terminate)�TOLERANCE_DISK_USAGE)�TOLERANCE_SYS_MEM)�unittestc � � 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 �w/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/psutil/tests/test_osx.py�sysctlr sU � � �W�+�+�C� �Y�Y�[�[��^�F���6�{�{���� � � �� � � ����s �: �A �A c � � ddl m} t d� � }|� d� � D ]}| |v r n� t d� � �t t j d|� � � d� � � � |� � z S )z)Wrapper around 'vm_stat' cmdline utility.r )�getpagesize�vm_stat� zline not foundz\d+) �psutil._psutil_posixr r r r r �re�search�group)�fieldr r �lines r r r % s� � �0�0�0�0�0�0� �Y�-�-�C�� � �$��� +� +���D�=�=��E� � �)�*�*�*��r�y���&�&�,�,�Q�/�/�0�0�;�;�=�=�@�@� c �v � ddi}| }d}| r| dd� � � � s| dd� dk rA|| d z }| dd � } | r| dd� � � � �3| dd� dk �At |� � }| � � � }|� � � D ]\ }}||v r n6�|dk r|d }|� � � }nt d|z � � �|d di}t |dd � � � D ]\ }} d|dz d z z || <