관리-도구
편집 파일: test_contracts.cpython-37.pyc
B �L�_�i � @ sf d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl m Z ddl mZ ddl mZ ddl m Z ddl mZ ddl mZ dd l mZ dd l mZ ddl mZ ddl mZ dd l mZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" ddlm#Z# ddlm$Z$ ddlm%Z% ddlm&Z& ddlm'Z' ddlm(Z( dd lm)Z) dd!lm*Z* dd"lm+Z+ dd#lm,Z, ddl Z G d$d%� d%e'�Z-G d&d'� d'e'�Z.G d(d)� d)e'�Z/G d*d+� d+e'�Z0G d,d-� d-e'�Z1d.d/� Z2e)G d0d1� d1e'��Z3e4d2k�rbdd3l5m6Z6 e6e7� dS )4z�Contracts tests. These tests mainly check API sanity in terms of returned types and APIs availability. Some of these are duplicates of tests test_system.py and test_process.py � N)�AIX)�BSD)�FREEBSD)�LINUX)�MACOS)�NETBSD)�OPENBSD)�OSX)�POSIX)�SUNOS)�WINDOWS)�FileNotFoundError)�long)�range)�APPVEYOR)�check_connection_ntuple)� CI_TESTING)�create_sockets)�enum)�GITHUB_ACTIONS)�HAS_CPU_FREQ)�HAS_NET_IO_COUNTERS)�HAS_SENSORS_FANS)�HAS_SENSORS_TEMPERATURES)� is_namedtuple)�kernel_version)�process_namespace)�PsutilTestCase)�PYPY)� serialrun)�SKIP_SYSCONS)�unittest)�VALID_PROC_STATUSESc @ sD e Zd Zdd� Zdd� Zdd� Zdd� Ze�e o2e d �d d� �ZdS ) �TestAvailConstantsAPIsc C s | � ttd�tptpt� d S )N�PROCFS_PATH)�assertEqual�hasattr�psutilr r r )�self� r) �N/opt/alt/python37/lib64/python3.7/site-packages/psutil/tests/test_contracts.py�test_PROCFS_PATHB s z'TestAvailConstantsAPIs.test_PROCFS_PATHc C sj | j }|ttd�t� |ttd�t� |ttd�t� |ttd�t� |ttd�t� |ttd�t� d S )NZABOVE_NORMAL_PRIORITY_CLASSZBELOW_NORMAL_PRIORITY_CLASSZHIGH_PRIORITY_CLASSZIDLE_PRIORITY_CLASSZNORMAL_PRIORITY_CLASSZREALTIME_PRIORITY_CLASS)r% r&