File: //snap/core18/current/usr/lib/python3.6/test/libregrtest/__pycache__/main.cpython-36.pyc
3
�äh]V � @ sp d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
Z
d dlZd dlm
Z
d dlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ d dlmZ d dl m!Z!m"Z"m#Z#m$Z$ d dl%m&Z& yd dl'Z'W n e(k
�r dZ'Y nX ej)� �r@ej*d�a+t+dk�r0ej*d�a+ej,j-t+d �a+ne j.� a+ej,j/t+�a+G d
d� d�Z0ddd
�Z1dS )� N)�_parse_args)� findtests�runtest�get_abs_module�STDTESTS�NOTTESTS�PASSED�FAILED�ENV_CHANGED�SKIPPED�RESOURCE_DENIED�INTERRUPTED�CHILD_ERROR�TEST_DID_NOT_RUN�PROGRESS_MIN_TIME�format_test_result)�setup_tests)�removepy�count�format_duration� printlist)�supportZabs_builddirZsrcdirZbuildc @ 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%d&�Zd'd(� Zd$S )*�Regrtestal Execute a test suite.
This also parses command-line options and modifies its behavior
accordingly.
tests -- a list of strings containing test names (optional)
testdir -- the directory in which to look for tests (optional)
Users other than the Python test suite will certainly want to
specify testdir; if it's omitted, the directory containing the
Python test suite is searched for.
If the tests argument is omitted, the tests listed on the
command-line will be used. If that's empty, too, then all *.py
files beginning with test_ will be used.
The other default arguments (verbose, quiet, exclude,
single, randomize, findleaks, use_resources, trace, coverdir,
print_slow, and random_seed) allow programmers calling main()
directly to set the values that would normally be set by flags
on the command line.
c C s� d | _ g | _g | _g | _g | _g | _g | _g | _g | _g | _ d | _
d| _g | _d | _
g | _tj� | _d| _d| _d | _d | _d | _d S )NF� � )�ns�tests�selected�good�bad�skipped�resource_denieds�environment_changed�rerun�run_no_tests�first_result�interrupted�
test_times�tracer�
found_garbage�time� monotonic�
start_time�
test_count�test_count_width�next_single_test�next_single_filename�
testsuite_xml)�self� r3 �+/usr/lib/python3.6/test/libregrtest/main.py�__init__C s*
zRegrtest.__init__c C s2 |\}}}|t tfkr&| jj||f� |tkr<| jj|� n�|tt fkrV| jj|� nx|tkrl| j j|� nb|t
kr�| jj|� nL|tkr�| jj|� | j
j|� n*|tkr�| jj|� n|tkr�td| ��|�r.dd ljj}xL|D ]D}y| jj|j|�� W q� |jk
�r( t|tjd� � Y q�X q�W d S )Nzinvalid test result: %rr )�file)r r
r'