관리-도구
편집 파일: test_contracts.cpython-36.pyc
3 ��JZ2^ � @ s� d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m Z ddl mZ ddl mZ ddl m Z ddl mZ dd l mZ dd l mZ ddl mZ ddl mZ dd l mZ ddlmZ 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' ddl Z G d d!� d!e$j(�Z)G d"d#� d#e$j(�Z*G d$d%� d%e$j(�Z+G d&d'� d'e$j(�Z,e-d(k�r�e e.� dS ))z�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)�closing)�AIX)�BSD)�FREEBSD)�LINUX)�NETBSD)�OPENBSD)�OSX)�POSIX)�SUNOS)�WINDOWS)�callable)�long)�bind_unix_socket)�check_connection_ntuple)�get_kernel_version)�HAS_CONNECTIONS_UNIX)� HAS_RLIMIT)�HAS_SENSORS_FANS)�HAS_SENSORS_TEMPERATURES)� is_namedtuple)�run_test_module_by_name)�safe_rmpath)�skip_on_access_denied)�TESTFN)�unittest)�unix_socket_path)�VALID_PROC_STATUSES)�warnc @ s� e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.S )/�TestAvailabilityzQMake sure code reflects what doc promises in terms of APIs availability. c C s$ t p tp t}| jttjd�|� d S )N�cpu_affinity)r r r �assertEqual�hasattr�psutil�Process)�self�hasit� r'