관리-도구
편집 파일: test_sunos.cpython-311.pyc
� �܋f5 � �� � d Z ddlZddlZddlZddlmZ ddlmZ ddlmZ ej e d� � G d� de� � � � Z e d k rdd lmZ ee � � dS dS )zSun OS specific tests.� N)�SUNOS)�PsutilTestCase)�shz SUNOS onlyc � � e Zd Zd� Zd� ZdS )�SunOSSpecificTestCasec �x � t dt j d z � � }|� � � � d� � dd � }|st d� � �dx}}|D ]g}|� � � }|dd � \ }}|t t |� � dz � � z }|t t |� � dz � � z }�h||z }t j � � } | � | j |� � | � | j |� � | � | j |� � d S ) Nz#env PATH=/usr/sbin:/sbin:%s swap -l�PATH� � zno swap device(s) configuredr ���i ) r �os�environ�strip�split� ValueError�int�psutil�swap_memory�assertEqual�total�used�free) �self�out�linesr r �line�t�fr �psutil_swaps �j/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/psutil/tests/test_sunos.py�test_swap_memoryz&SunOSSpecificTestCase.test_swap_memory s0 � ��6���F�9K�K�L�L��� � ���!�!�$�'�'����+��� =��;�<�<�<������ &� &�D��:�:�<�<�D�����9�D�A�q��S��Q���#��&�&�&�E��C��A�����%�%�%�D�D��t�|���(�*�*������*�E�2�2�2�����)�4�0�0�0�����)�4�0�0�0�0�0� c � � t d� � }| � t j � � t |� d� � � � � � d S )Nz/usr/sbin/psrinfor )r r r � cpu_count�lenr )r r s r �test_cpu_countz$SunOSSpecificTestCase.test_cpu_count'