MOON
Server: Apache
System: Linux server30c.hostingraja.org 3.10.0-962.3.2.lve1.5.63.el7.x86_64 #1 SMP Fri Oct 8 12:03:35 UTC 2021 x86_64
User: jibhires (1887)
PHP: 8.1.30
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open, allow_url_fopen, symlink, escapeshellcmd, pcntl_exec
Upload Files
File: //opt/alt/python35/lib64/python3.5/site-packages/psutil/tests/__pycache__/test_sunos.cpython-35.pyc


Cs[*�@s�dZddlZddlZddlmZddlmZddlmZddlmZejed�Gdd	�d	ej	��Z
ed
kr�ee�dS)zSun OS specific tests.�N)�SUNOS)�run_test_module_by_name)�sh)�unittestz
SUNOS onlyc@s(eZdZdd�Zdd�ZdS)�SunOSSpecificTestCasec
Cstdtjd�}|j�jd�dd�}|sHtd��d}}xd|D]\}|j�}|d	d�\}}|tt|�d�7}|tt|�d�7}qYW||}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�/test_sunos.py�test_swap_memorys


z&SunOSSpecificTestCase.test_swap_memorycCs5td�}|jtj�t|jd���dS)Nz/usr/sbin/psrinfor)rrr�	cpu_count�lenr)rrrrr�test_cpu_count'sz$SunOSSpecificTestCase.test_cpu_countN)�__name__�
__module__�__qualname__rr"rrrrrsr�__main__)
�__doc__rrrZpsutil.testsrrrZskipIfZTestCaserr#�__file__rrrr�<module>s