관리-도구
편집 파일: test_memory_leaks.cpython-36.pyc
3 ��JZ=G � @ s< d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZ ddl mZ ddl m Z ddl mZ ddl mZ ddl mZ dd l mZ dd lmZ ddlmZ ddlmZ dd lmZ 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( dZ)d Z*d!Z+e'�r�d"nd#Z,e j-j.Z.e j/� Z0e'�r�d"nd#Z,d$d%� Z1d&d'� Z2G d(d)� d)e(j3�Z4G d*d+� d+e4�Z5G d,d-� d-e5�Z6G d.d/� d/e4�Z7e8d0k�r8e#e9� dS )1a) Tests for detecting function memory leaks (typically the ones implemented in C). It does so by calling a function many times and checking whether process memory usage keeps increasing between calls or over time. Note that this may produce false positives (especially on Windows for some reason). � )�print_functionN)�LINUX)�OPENBSD)�OSX)�POSIX)�SUNOS)�WINDOWS)�xrange)�create_sockets)�get_test_subprocess)�HAS_CPU_AFFINITY)�HAS_CPU_FREQ)�HAS_ENVIRON)� HAS_IONICE)�HAS_MEMORY_MAPS)�HAS_PROC_CPU_NUM)�HAS_PROC_IO_COUNTERS)� HAS_RLIMIT)�HAS_SENSORS_BATTERY)�HAS_SENSORS_FANS)�HAS_SENSORS_TEMPERATURES)� reap_children)�run_test_module_by_name)�safe_rmpath)�skip_on_access_denied)�TESTFN)�TRAVIS)�unittesti� i � TFc C s t jto td�S )Nz worthless on LINUX (pure python))r �skipIfr �SKIP_PYTHON_IMPL� r! r! �)/usr/lib64/python3.6/test_memory_leaks.py� skip_if_linuxF s r# c C st d }i }x(t |�D ]\}}d |d d >