U 1g@sjdZddlZddlZddlmZddlmZddlmZddlmZejj e ddGd d d eZ dS) zSun OS specific tests.N)SUNOS)PsutilTestCase)pytest)shz SUNOS only)reasonc@seZdZddZddZdS)SunOSSpecificTestCasec Cstdtjd}|ddd}|s4tdd}}|D],}|}t|dd}t|d d}q@||}t}|j |kst |j |kst |j |kst dS) Nz#env PATH=/usr/sbin:/sbin:%s swap -lPATH zno swap device(s) configuredri) rosenvironstripsplit ValueErrorintpsutilZ swap_memorytotalAssertionErrorusedfree) selfoutlinesrrlinefieldsrZ psutil_swaprG/opt/hc_python/lib64/python3.8/site-packages/psutil/tests/test_sunos.pytest_swap_memorysz&SunOSSpecificTestCase.test_swap_memorycCs&td}tt|dks"tdS)Nz/usr/sbin/psrinfor )rr cpu_countlenrr)rrrrrtest_cpu_count%sz$SunOSSpecificTestCase.test_cpu_countN)__name__ __module__ __qualname__rr"rrrrrsr) __doc__r rrZ psutil.testsrrrmarkZskipifrrrrrs