/snap/core18/2999/usr/lib/python3.6/test/libregrtest/__pycache__
Edit: /snap/core18/2999/usr/lib/python3.6/test/libregrtest/__pycache__/main.cpython-36.pyc (14830B)
3
Nqi]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*da+t+dkr0ej*da+ej,j-t+d a+ne j. a+ej,j/t+a+G d
d dZ0ddd
Z1dS ) N)_parse_args) findtestsruntestget_abs_moduleSTDTESTSNOTTESTSPASSEDFAILEDENV_CHANGEDSKIPPEDRESOURCE_DENIEDINTERRUPTEDCHILD_ERRORTEST_DID_NOT_RUNPROGRESS_MIN_TIMEformat_test_result)setup_tests)removepycountformat_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 )nstestsselectedgoodbadskippedresource_deniedsenvironment_changedrerunrun_no_testsfirst_resultinterrupted
test_timestracer
found_garbagetime monotonic
start_time
test_counttest_count_widthnext_single_testnext_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|tkrtd| |r.dd ljj}xL|D ]D}y| jj|j| W q |jk
r( t|tjd Y qX qW d S )Nzinvalid test result: %rr )file)r r
r' appendr r r r r
r" r r r r! r r$
ValueErrorxml.etree.ElementTreeetreeElementTreer1 Z
fromstringZ
ParseErrorprintsys
__stderr__)r2 testresultok test_timeZxml_dataETer3 r3 r4 accumulate_resultk s4
zRegrtest.accumulate_resultc C s | j jrd S || j | j }t| jt| j }|rP| j j rP| d| }d| d| }tt drt j
d }d|dd| }tj | j
}tjt|d }| d| }t|d
d d S )N/[z]
getloadavgr z
load avg: z.2f )ZsecondsT)flush)r quietr. r- lenr r" pgohasattrosrH r* r+ r, datetimeZ timedeltaintr<