관리-도구
편집 파일: test_bsd.cpython-37.pyc
B �=�_�P � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddl mZ ddl mZ dd l m Z dd l mZ ddl mZ ddl mZ dd l mZ ddl mZ ddl mZ er�ddlmZ e� Ze�� dkr�ed�r�dndZndZdZdd� Zdd� Ze�e d�G dd� de ��Ze�e d�G dd� de ��Ze�e d�G dd� de ��Ze�e d�G d d!� d!e ��Ze�e d"�G d#d$� d$e ��Z e!d%k�r�dd&l"m#Z# e#e$� dS )'z$Tests specific to all BSD platforms.� N)�BSD)�FREEBSD)�NETBSD)�OPENBSD)�spawn_testproc)�HAS_BATTERY)�PsutilTestCase)�retry_on_failure)�sh)�TOLERANCE_SYS_MEM)� terminate)�unittest)�which)�getpagesize�museTFc C sh t d| �}tr(||�d�d d� }nts0trF||�d�d d� }yt|�S tk rb |S X dS )zmExpects a sysctl command with an argument and parse the result returning only the value of interest. zsysctl z: � N�=� )r r �findr r �int� ValueError)�cmdline�result� r �H/opt/alt/python37/lib64/python3.7/site-packages/psutil/tests/test_bsd.py�sysctl- s r c C s@ t d�}x&|�d�D ]}|�| �rP qW td��t|�� d �S )z+Thin wrapper around 'muse' cmdline utility.r � zline not foundr )r �split� startswithr r )�field�out�liner r r r <