Your IP : 18.191.200.151


Current Path : /lib64/python3.6/site-packages/psutil/tests/__pycache__/
Upload File :
Current File : //lib64/python3.6/site-packages/psutil/tests/__pycache__/test_sunos.cpython-36.pyc

3

��JZ�@sxdZddlZddlZddlmZddlmZddlmZddlmZejed�Gdd	�d	ej	��Z
ed
krtee�dS)zSun OS specific tests.�N)�SUNOS)�run_test_module_by_name)�sh)�unittestz
SUNOS onlyc@seZdZdd�Zdd�ZdS)�SunOSSpecificTestCasec
Cs�tdtjd�}|j�jd�dd�}|s4td��d}}xL|D]D}|j�}|d	d�\}}|tt|�d�7}|tt|�d�7}qBW||}tj�}	|j	|	j
|�|j	|	j|�|j	|	j|�dS)
Nz#env PATH=/usr/sbin:/sbin:%s swap -l�PATH�
�zno swap device(s) configuredr�i���)
r�os�environ�strip�split�
ValueError�int�psutilZswap_memory�assertEqual�total�used�free)
�self�out�linesrr�line�t�frZpsutil_swap�r�"/usr/lib64/python3.6/test_sunos.py�test_swap_memorys
z&SunOSSpecificTestCase.test_swap_memorycCs&td�}|jtj�t|jd���dS)Nz/usr/sbin/psrinfor)rrr�	cpu_count�lenr)rrrrr�test_cpu_count&sz$SunOSSpecificTestCase.test_cpu_countN)�__name__�
__module__�__qualname__rr"rrrrrsr�__main__)
�__doc__rrrZpsutil.testsrrrZskipIfZTestCaserr#�__file__rrrr�<module>s


?>