/opt/alt/python36/lib64/python3.6/__pycache__
NameSizeModeActions
abc.cpython-36.opt-1.pyc74870644editdlrm
abc.cpython-36.opt-2.pyc41230644editdlrm
abc.cpython-36.pyc75300644editdlrm
aifc.cpython-36.opt-1.pyc259580644editdlrm
aifc.cpython-36.opt-2.pyc207530644editdlrm
aifc.cpython-36.pyc259580644editdlrm
antigravity.cpython-36.opt-1.pyc7940644editdlrm
antigravity.cpython-36.opt-2.pyc6500644editdlrm
antigravity.cpython-36.pyc7940644editdlrm
argparse.cpython-36.opt-1.pyc600710644editdlrm
argparse.cpython-36.opt-2.pyc508300644editdlrm
argparse.cpython-36.pyc602050644editdlrm
ast.cpython-36.opt-1.pyc117190644editdlrm
ast.cpython-36.opt-2.pyc61340644editdlrm
ast.cpython-36.pyc117190644editdlrm
asynchat.cpython-36.opt-1.pyc68300644editdlrm
asynchat.cpython-36.opt-2.pyc54540644editdlrm
asynchat.cpython-36.pyc68300644editdlrm
asyncore.cpython-36.opt-1.pyc158530644editdlrm
asyncore.cpython-36.opt-2.pyc146490644editdlrm
asyncore.cpython-36.pyc158530644editdlrm
base64.cpython-36.opt-1.pyc169160644editdlrm
base64.cpython-36.opt-2.pyc113180644editdlrm
base64.cpython-36.pyc170740644editdlrm
bdb.cpython-36.opt-1.pyc170480644editdlrm
bdb.cpython-36.opt-2.pyc153220644editdlrm
bdb.cpython-36.pyc170480644editdlrm
binhex.cpython-36.opt-1.pyc121010644editdlrm
binhex.cpython-36.opt-2.pyc115680644editdlrm
binhex.cpython-36.pyc121010644editdlrm
bisect.cpython-36.opt-1.pyc26910644editdlrm
bisect.cpython-36.opt-2.pyc13950644editdlrm
bisect.cpython-36.pyc26910644editdlrm
bz2.cpython-36.opt-1.pyc112970644editdlrm
bz2.cpython-36.opt-2.pyc62400644editdlrm
bz2.cpython-36.pyc112970644editdlrm
calendar.cpython-36.opt-1.pyc258970644editdlrm
calendar.cpython-36.opt-2.pyc213700644editdlrm
calendar.cpython-36.pyc258970644editdlrm
cgi.cpython-36.opt-1.pyc286210644editdlrm
cgi.cpython-36.opt-2.pyc194820644editdlrm
cgi.cpython-36.pyc286210644editdlrm
cgitb.cpython-36.opt-1.pyc100950644editdlrm
cgitb.cpython-36.opt-2.pyc84960644editdlrm
cgitb.cpython-36.pyc100950644editdlrm
chunk.cpython-36.opt-1.pyc49150644editdlrm
chunk.cpython-36.opt-2.pyc27690644editdlrm
chunk.cpython-36.pyc49150644editdlrm
cmd.cpython-36.opt-1.pyc125900644editdlrm
cmd.cpython-36.opt-2.pyc71510644editdlrm
cmd.cpython-36.pyc125900644editdlrm
code.cpython-36.opt-1.pyc98510644editdlrm
code.cpython-36.opt-2.pyc45750644editdlrm
code.cpython-36.pyc98510644editdlrm
codecs.cpython-36.opt-1.pyc339150644editdlrm
codecs.cpython-36.opt-2.pyc180670644editdlrm
codecs.cpython-36.pyc339150644editdlrm
codeop.cpython-36.opt-1.pyc62850644editdlrm
codeop.cpython-36.opt-2.pyc22380644editdlrm
codeop.cpython-36.pyc62850644editdlrm
colorsys.cpython-36.opt-1.pyc33260644editdlrm
colorsys.cpython-36.opt-2.pyc27200644editdlrm
colorsys.cpython-36.pyc33260644editdlrm
compileall.cpython-36.opt-1.pyc82930644editdlrm
compileall.cpython-36.opt-2.pyc61550644editdlrm
compileall.cpython-36.pyc82930644editdlrm
configparser.cpython-36.opt-1.pyc452590644editdlrm
configparser.cpython-36.opt-2.pyc305710644editdlrm
configparser.cpython-36.pyc452590644editdlrm
contextlib.cpython-36.opt-1.pyc111730644editdlrm
contextlib.cpython-36.opt-2.pyc78270644editdlrm
contextlib.cpython-36.pyc111730644editdlrm
copy.cpython-36.opt-1.pyc70940644editdlrm
copy.cpython-36.opt-2.pyc47780644editdlrm
copy.cpython-36.pyc70940644editdlrm
copyreg.cpython-36.opt-1.pyc42240644editdlrm
copyreg.cpython-36.opt-2.pyc34200644editdlrm
copyreg.cpython-36.pyc42590644editdlrm
cProfile.cpython-36.opt-1.pyc43090644editdlrm
cProfile.cpython-36.opt-2.pyc38480644editdlrm
cProfile.cpython-36.pyc43090644editdlrm
crypt.cpython-36.opt-1.pyc22570644editdlrm
crypt.cpython-36.opt-2.pyc15930644editdlrm
crypt.cpython-36.pyc22570644editdlrm
csv.cpython-36.opt-1.pyc118700644editdlrm
csv.cpython-36.opt-2.pyc98310644editdlrm
csv.cpython-36.pyc118700644editdlrm
datetime.cpython-36.opt-1.pyc530730644editdlrm
datetime.cpython-36.opt-2.pyc442230644editdlrm
datetime.cpython-36.pyc545260644editdlrm
decimal.cpython-36.opt-1.pyc3660644editdlrm
decimal.cpython-36.opt-2.pyc3660644editdlrm
decimal.cpython-36.pyc3660644editdlrm
difflib.cpython-36.opt-1.pyc596190644editdlrm
difflib.cpython-36.opt-2.pyc250490644editdlrm
difflib.cpython-36.pyc596570644editdlrm
dis.cpython-36.opt-1.pyc141960644editdlrm
dis.cpython-36.opt-2.pyc106640644editdlrm
dis.cpython-36.pyc141960644editdlrm
doctest.cpython-36.opt-1.pyc753590644editdlrm
doctest.cpython-36.opt-2.pyc400320644editdlrm
doctest.cpython-36.pyc756040644editdlrm
dummy_threading.cpython-36.opt-1.pyc11170644editdlrm
dummy_threading.cpython-36.opt-2.pyc7440644editdlrm
dummy_threading.cpython-36.pyc11170644editdlrm
enum.cpython-36.opt-1.pyc234680644editdlrm
enum.cpython-36.opt-2.pyc191750644editdlrm
enum.cpython-36.pyc234680644editdlrm
filecmp.cpython-36.opt-1.pyc83200644editdlrm
filecmp.cpython-36.opt-2.pyc59030644editdlrm
filecmp.cpython-36.pyc83200644editdlrm
fileinput.cpython-36.opt-1.pyc131670644editdlrm
fileinput.cpython-36.opt-2.pyc76280644editdlrm
fileinput.cpython-36.pyc131670644editdlrm
fnmatch.cpython-36.opt-1.pyc28890644editdlrm
fnmatch.cpython-36.opt-2.pyc17000644editdlrm
fnmatch.cpython-36.pyc28890644editdlrm
formatter.cpython-36.opt-1.pyc175940644editdlrm
formatter.cpython-36.opt-2.pyc151540644editdlrm
formatter.cpython-36.pyc175940644editdlrm
fractions.cpython-36.opt-1.pyc184410644editdlrm
fractions.cpython-36.opt-2.pyc111550644editdlrm
fractions.cpython-36.pyc184410644editdlrm
ftplib.cpython-36.opt-1.pyc283720644editdlrm
ftplib.cpython-36.opt-2.pyc185680644editdlrm
ftplib.cpython-36.pyc283720644editdlrm
functools.cpython-36.opt-1.pyc240770644editdlrm
functools.cpython-36.opt-2.pyc181060644editdlrm
functools.cpython-36.pyc240770644editdlrm
genericpath.cpython-36.opt-1.pyc37410644editdlrm
genericpath.cpython-36.opt-2.pyc27480644editdlrm
genericpath.cpython-36.pyc37410644editdlrm
getopt.cpython-36.opt-1.pyc61980644editdlrm
getopt.cpython-36.opt-2.pyc36440644editdlrm
getopt.cpython-36.pyc62320644editdlrm
getpass.cpython-36.opt-1.pyc41920644editdlrm
getpass.cpython-36.opt-2.pyc30070644editdlrm
getpass.cpython-36.pyc41920644editdlrm
gettext.cpython-36.opt-1.pyc142120644editdlrm
gettext.cpython-36.opt-2.pyc135210644editdlrm
gettext.cpython-36.pyc142120644editdlrm
glob.cpython-36.opt-1.pyc42050644editdlrm
glob.cpython-36.opt-2.pyc33450644editdlrm
glob.cpython-36.pyc42740644editdlrm
gzip.cpython-36.opt-1.pyc162410644editdlrm
gzip.cpython-36.opt-2.pyc124350644editdlrm
gzip.cpython-36.pyc162410644editdlrm
hashlib.cpython-36.opt-1.pyc67070644editdlrm
hashlib.cpython-36.opt-2.pyc61350644editdlrm
hashlib.cpython-36.pyc67070644editdlrm
heapq.cpython-36.opt-1.pyc143070644editdlrm
heapq.cpython-36.opt-2.pyc113170644editdlrm
heapq.cpython-36.pyc143070644editdlrm
hmac.cpython-36.opt-1.pyc48510644editdlrm
hmac.cpython-36.opt-2.pyc30400644editdlrm
hmac.cpython-36.pyc48510644editdlrm
imaplib.cpython-36.opt-1.pyc399340644editdlrm
imaplib.cpython-36.opt-2.pyc278460644editdlrm
imaplib.cpython-36.pyc421530644editdlrm
imghdr.cpython-36.opt-1.pyc41650644editdlrm
imghdr.cpython-36.opt-2.pyc38500644editdlrm
imghdr.cpython-36.pyc41650644editdlrm
imp.cpython-36.opt-1.pyc97110644editdlrm
imp.cpython-36.opt-2.pyc73080644editdlrm
imp.cpython-36.pyc97110644editdlrm
inspect.cpython-36.opt-1.pyc794540644editdlrm
inspect.cpython-36.opt-2.pyc540390644editdlrm
inspect.cpython-36.pyc797540644editdlrm
io.cpython-36.opt-1.pyc34020644editdlrm
io.cpython-36.opt-2.pyc19110644editdlrm
io.cpython-36.pyc34020644editdlrm
ipaddress.cpython-36.opt-1.pyc624010644editdlrm
ipaddress.cpython-36.opt-2.pyc368150644editdlrm
ipaddress.cpython-36.pyc624010644editdlrm
keyword.cpython-36.opt-1.pyc17800644editdlrm
keyword.cpython-36.opt-2.pyc15120644editdlrm
keyword.cpython-36.pyc17800644editdlrm
linecache.cpython-36.opt-1.pyc37930644editdlrm
linecache.cpython-36.opt-2.pyc26880644editdlrm
linecache.cpython-36.pyc37930644editdlrm
locale.cpython-36.opt-1.pyc340600644editdlrm
locale.cpython-36.opt-2.pyc294350644editdlrm
locale.cpython-36.pyc340600644editdlrm
lzma.cpython-36.opt-1.pyc120070644editdlrm
lzma.cpython-36.opt-2.pyc58160644editdlrm
lzma.cpython-36.pyc120070644editdlrm
macpath.cpython-36.opt-1.pyc56560644editdlrm
macpath.cpython-36.opt-2.pyc43900644editdlrm
macpath.cpython-36.pyc56560644editdlrm
macurl2path.cpython-36.opt-1.pyc18820644editdlrm
macurl2path.cpython-36.opt-2.pyc15020644editdlrm
macurl2path.cpython-36.pyc18820644editdlrm
mailbox.cpython-36.opt-1.pyc636850644editdlrm
mailbox.cpython-36.opt-2.pyc545380644editdlrm
mailbox.cpython-36.pyc637670644editdlrm
mailcap.cpython-36.opt-1.pyc64930644editdlrm
mailcap.cpython-36.opt-2.pyc49750644editdlrm
mailcap.cpython-36.pyc64930644editdlrm
mimetypes.cpython-36.opt-1.pyc155680644editdlrm
mimetypes.cpython-36.opt-2.pyc95700644editdlrm
mimetypes.cpython-36.pyc155680644editdlrm
modulefinder.cpython-36.opt-1.pyc153190644editdlrm
modulefinder.cpython-36.opt-2.pyc144780644editdlrm
modulefinder.cpython-36.pyc153810644editdlrm
netrc.cpython-36.opt-1.pyc38510644editdlrm
netrc.cpython-36.opt-2.pyc36130644editdlrm
netrc.cpython-36.pyc38510644editdlrm
nntplib.cpython-36.opt-1.pyc337950644editdlrm
nntplib.cpython-36.opt-2.pyc212540644editdlrm
nntplib.cpython-36.pyc337950644editdlrm
ntpath.cpython-36.opt-1.pyc137650644editdlrm
ntpath.cpython-36.opt-2.pyc112940644editdlrm
ntpath.cpython-36.pyc137650644editdlrm
nturl2path.cpython-36.opt-1.pyc15140644editdlrm
nturl2path.cpython-36.opt-2.pyc11960644editdlrm
nturl2path.cpython-36.pyc15140644editdlrm
numbers.cpython-36.opt-1.pyc121570644editdlrm
numbers.cpython-36.opt-2.pyc81960644editdlrm
numbers.cpython-36.pyc121570644editdlrm
opcode.cpython-36.opt-1.pyc54280644editdlrm
opcode.cpython-36.opt-2.pyc52880644editdlrm
opcode.cpython-36.pyc54280644editdlrm
operator.cpython-36.opt-1.pyc139280644editdlrm
operator.cpython-36.opt-2.pyc114690644editdlrm
operator.cpython-36.pyc139280644editdlrm
optparse.cpython-36.opt-1.pyc480010644editdlrm
optparse.cpython-36.opt-2.pyc356460644editdlrm
optparse.cpython-36.pyc480690644editdlrm
os.cpython-36.opt-1.pyc296430644editdlrm
os.cpython-36.opt-2.pyc177940644editdlrm
os.cpython-36.pyc296430644editdlrm
pathlib.cpython-36.opt-1.pyc420220644editdlrm
pathlib.cpython-36.opt-2.pyc343800644editdlrm
pathlib.cpython-36.pyc420220644editdlrm
pdb.cpython-36.opt-1.pyc460520644editdlrm
pdb.cpython-36.opt-2.pyc319850644editdlrm
pdb.cpython-36.pyc461090644editdlrm
pickle.cpython-36.opt-1.pyc425890644editdlrm
pickle.cpython-36.opt-2.pyc378010644editdlrm
pickle.cpython-36.pyc427060644editdlrm
pickletools.cpython-36.opt-1.pyc651840644editdlrm
pickletools.cpython-36.opt-2.pyc564430644editdlrm
pickletools.cpython-36.pyc660350644editdlrm
pipes.cpython-36.opt-1.pyc78230644editdlrm
pipes.cpython-36.opt-2.pyc49500644editdlrm
pipes.cpython-36.pyc78230644editdlrm
pkgutil.cpython-36.opt-1.pyc162760644editdlrm
pkgutil.cpython-36.opt-2.pyc110160644editdlrm
pkgutil.cpython-36.pyc162760644editdlrm
platform.cpython-36.opt-1.pyc286460644editdlrm
platform.cpython-36.opt-2.pyc193980644editdlrm
platform.cpython-36.pyc286460644editdlrm
plistlib.cpython-36.opt-1.pyc280030644editdlrm
plistlib.cpython-36.opt-2.pyc247490644editdlrm
plistlib.cpython-36.pyc280700644editdlrm
poplib.cpython-36.opt-1.pyc133440644editdlrm
poplib.cpython-36.opt-2.pyc84130644editdlrm
poplib.cpython-36.pyc133440644editdlrm
posixpath.cpython-36.opt-1.pyc104380644editdlrm
posixpath.cpython-36.opt-2.pyc87170644editdlrm
posixpath.cpython-36.pyc104380644editdlrm
pprint.cpython-36.opt-1.pyc157840644editdlrm
pprint.cpython-36.opt-2.pyc137200644editdlrm
pprint.cpython-36.pyc158390644editdlrm
profile.cpython-36.opt-1.pyc137100644editdlrm
profile.cpython-36.opt-2.pyc107280644editdlrm
profile.cpython-36.pyc139160644editdlrm
pstats.cpython-36.opt-1.pyc218720644editdlrm
pstats.cpython-36.opt-2.pyc194180644editdlrm
pstats.cpython-36.pyc218720644editdlrm
pty.cpython-36.opt-1.pyc38760644editdlrm
pty.cpython-36.opt-2.pyc30230644editdlrm
pty.cpython-36.pyc38760644editdlrm
pyclbr.cpython-36.opt-1.pyc83800644editdlrm
pyclbr.cpython-36.opt-2.pyc55840644editdlrm
pyclbr.cpython-36.pyc83800644editdlrm
pydoc.cpython-36.opt-1.pyc834580644editdlrm
pydoc.cpython-36.opt-2.pyc742570644editdlrm
pydoc.cpython-36.pyc835110644editdlrm
py_compile.cpython-36.opt-1.pyc65590644editdlrm
py_compile.cpython-36.opt-2.pyc29550644editdlrm
py_compile.cpython-36.pyc65590644editdlrm
queue.cpython-36.opt-1.pyc87700644editdlrm
queue.cpython-36.opt-2.pyc49800644editdlrm
queue.cpython-36.pyc87700644editdlrm
quopri.cpython-36.opt-1.pyc56130644editdlrm
quopri.cpython-36.opt-2.pyc45770644editdlrm
quopri.cpython-36.pyc57880644editdlrm
random.cpython-36.opt-1.pyc193450644editdlrm
random.cpython-36.opt-2.pyc128040644editdlrm
random.cpython-36.pyc193450644editdlrm
re.cpython-36.opt-1.pyc140730644editdlrm
re.cpython-36.opt-2.pyc57930644editdlrm
re.cpython-36.pyc140730644editdlrm
reprlib.cpython-36.opt-1.pyc54150644editdlrm
reprlib.cpython-36.opt-2.pyc52590644editdlrm
reprlib.cpython-36.pyc54150644editdlrm
rlcompleter.cpython-36.opt-1.pyc57950644editdlrm
rlcompleter.cpython-36.opt-2.pyc31320644editdlrm
rlcompleter.cpython-36.pyc57950644editdlrm
runpy.cpython-36.opt-1.pyc79970644editdlrm
runpy.cpython-36.opt-2.pyc64540644editdlrm
runpy.cpython-36.pyc79970644editdlrm
sched.cpython-36.opt-1.pyc65790644editdlrm
sched.cpython-36.opt-2.pyc35390644editdlrm
sched.cpython-36.pyc65790644editdlrm
secrets.cpython-36.opt-1.pyc21770644editdlrm
secrets.cpython-36.opt-2.pyc11190644editdlrm
secrets.cpython-36.pyc21770644editdlrm
selectors.cpython-36.opt-1.pyc177120644editdlrm
selectors.cpython-36.opt-2.pyc137360644editdlrm
selectors.cpython-36.pyc177120644editdlrm
shelve.cpython-36.opt-1.pyc94730644editdlrm
shelve.cpython-36.opt-2.pyc53200644editdlrm
shelve.cpython-36.pyc94730644editdlrm
shlex.cpython-36.opt-1.pyc69850644editdlrm
shlex.cpython-36.opt-2.pyc64730644editdlrm
shlex.cpython-36.pyc69850644editdlrm
shutil.cpython-36.opt-1.pyc307190644editdlrm
shutil.cpython-36.opt-2.pyc199460644editdlrm
shutil.cpython-36.pyc307190644editdlrm
signal.cpython-36.opt-1.pyc25300644editdlrm
signal.cpython-36.opt-2.pyc23020644editdlrm
signal.cpython-36.pyc25300644editdlrm
site.cpython-36.opt-1.pyc161550644editdlrm
site.cpython-36.opt-2.pyc106050644editdlrm
site.cpython-36.pyc161550644editdlrm
smtpd.cpython-36.opt-1.pyc266980644editdlrm
smtpd.cpython-36.opt-2.pyc240790644editdlrm
smtpd.cpython-36.pyc266980644editdlrm
smtplib.cpython-36.opt-1.pyc354310644editdlrm
smtplib.cpython-36.opt-2.pyc190190644editdlrm
smtplib.cpython-36.pyc354920644editdlrm
sndhdr.cpython-36.opt-1.pyc69280644editdlrm
sndhdr.cpython-36.opt-2.pyc56530644editdlrm
sndhdr.cpython-36.pyc69280644editdlrm
socket.cpython-36.opt-1.pyc219880644editdlrm
socket.cpython-36.opt-2.pyc145540644editdlrm
socket.cpython-36.pyc220280644editdlrm
socketserver.cpython-36.opt-1.pyc242650644editdlrm
socketserver.cpython-36.opt-2.pyc133400644editdlrm
socketserver.cpython-36.pyc242650644editdlrm
sre_compile.cpython-36.opt-1.pyc101530644editdlrm
sre_compile.cpython-36.opt-2.pyc97390644editdlrm
sre_compile.cpython-36.pyc102930644editdlrm
sre_constants.cpython-36.opt-1.pyc59870644editdlrm
sre_constants.cpython-36.opt-2.pyc55620644editdlrm
sre_constants.cpython-36.pyc59870644editdlrm
sre_parse.cpython-36.opt-1.pyc203260644editdlrm
sre_parse.cpython-36.opt-2.pyc202780644editdlrm
sre_parse.cpython-36.pyc203730644editdlrm
ssl.cpython-36.opt-1.pyc365170644editdlrm
ssl.cpython-36.opt-2.pyc269930644editdlrm
ssl.cpython-36.pyc365170644editdlrm
stat.cpython-36.opt-1.pyc38660644editdlrm
stat.cpython-36.opt-2.pyc31880644editdlrm
stat.cpython-36.pyc38660644editdlrm
statistics.cpython-36.opt-1.pyc179480644editdlrm
statistics.cpython-36.opt-2.pyc72610644editdlrm
statistics.cpython-36.pyc181890644editdlrm
string.cpython-36.opt-1.pyc79790644editdlrm
string.cpython-36.opt-2.pyc68730644editdlrm
string.cpython-36.pyc79790644editdlrm
stringprep.cpython-36.opt-1.pyc99870644editdlrm
stringprep.cpython-36.opt-2.pyc97670644editdlrm
stringprep.cpython-36.pyc100450644editdlrm
struct.cpython-36.opt-1.pyc3270644editdlrm
struct.cpython-36.opt-2.pyc3270644editdlrm
struct.cpython-36.pyc3270644editdlrm
subprocess.cpython-36.opt-1.pyc353990644editdlrm
subprocess.cpython-36.opt-2.pyc246850644editdlrm
subprocess.cpython-36.pyc355000644editdlrm
sunau.cpython-36.opt-1.pyc169530644editdlrm
sunau.cpython-36.opt-2.pyc123630644editdlrm
sunau.cpython-36.pyc169530644editdlrm
symbol.cpython-36.opt-1.pyc25320644editdlrm
symbol.cpython-36.opt-2.pyc24560644editdlrm
symbol.cpython-36.pyc25320644editdlrm
symtable.cpython-36.opt-1.pyc103360644editdlrm
symtable.cpython-36.opt-2.pyc96390644editdlrm
symtable.cpython-36.pyc104430644editdlrm
sysconfig.cpython-36.opt-1.pyc159420644editdlrm
sysconfig.cpython-36.opt-2.pyc133720644editdlrm
sysconfig.cpython-36.pyc159420644editdlrm
tabnanny.cpython-36.opt-1.pyc69900644editdlrm
tabnanny.cpython-36.opt-2.pyc60570644editdlrm
tabnanny.cpython-36.pyc69900644editdlrm
tarfile.cpython-36.opt-1.pyc627030644editdlrm
tarfile.cpython-36.opt-2.pyc489040644editdlrm
tarfile.cpython-36.pyc627030644editdlrm
telnetlib.cpython-36.opt-1.pyc181120644editdlrm
telnetlib.cpython-36.opt-2.pyc106020644editdlrm
telnetlib.cpython-36.pyc181120644editdlrm
tempfile.cpython-36.opt-1.pyc222420644editdlrm
tempfile.cpython-36.opt-2.pyc157700644editdlrm
tempfile.cpython-36.pyc222420644editdlrm
textwrap.cpython-36.opt-1.pyc136250644editdlrm
textwrap.cpython-36.opt-2.pyc63280644editdlrm
textwrap.cpython-36.pyc136990644editdlrm
this.cpython-36.opt-1.pyc12800644editdlrm
this.cpython-36.opt-2.pyc12800644editdlrm
this.cpython-36.pyc12800644editdlrm
threading.cpython-36.opt-1.pyc365960644editdlrm
threading.cpython-36.opt-2.pyc205550644editdlrm
threading.cpython-36.pyc372490644editdlrm
timeit.cpython-36.opt-1.pyc116180644editdlrm
timeit.cpython-36.opt-2.pyc56370644editdlrm
timeit.cpython-36.pyc116180644editdlrm
token.cpython-36.opt-1.pyc33350644editdlrm
token.cpython-36.opt-2.pyc32850644editdlrm
token.cpython-36.pyc33350644editdlrm
tokenize.cpython-36.opt-1.pyc186160644editdlrm
tokenize.cpython-36.opt-2.pyc150160644editdlrm
tokenize.cpython-36.pyc186620644editdlrm
trace.cpython-36.opt-1.pyc195100644editdlrm
trace.cpython-36.opt-2.pyc165070644editdlrm
trace.cpython-36.pyc195100644editdlrm
traceback.cpython-36.opt-1.pyc196610644editdlrm
traceback.cpython-36.opt-2.pyc107600644editdlrm
traceback.cpython-36.pyc196610644editdlrm
tracemalloc.cpython-36.opt-1.pyc172440644editdlrm
tracemalloc.cpython-36.opt-2.pyc158280644editdlrm
tracemalloc.cpython-36.pyc172440644editdlrm
tty.cpython-36.opt-1.pyc10870644editdlrm
tty.cpython-36.opt-2.pyc9860644editdlrm
tty.cpython-36.pyc10870644editdlrm
types.cpython-36.opt-1.pyc82160644editdlrm
types.cpython-36.opt-2.pyc70490644editdlrm
types.cpython-36.pyc82160644editdlrm
typing.cpython-36.opt-1.pyc729130644editdlrm
typing.cpython-36.opt-2.pyc560620644editdlrm
typing.cpython-36.pyc733210644editdlrm
uu.cpython-36.opt-1.pyc35660644editdlrm
uu.cpython-36.opt-2.pyc33480644editdlrm
uu.cpython-36.pyc35660644editdlrm
uuid.cpython-36.opt-1.pyc207970644editdlrm
uuid.cpython-36.opt-2.pyc141290644editdlrm
uuid.cpython-36.pyc209330644editdlrm
warnings.cpython-36.opt-1.pyc126810644editdlrm
warnings.cpython-36.opt-2.pyc103010644editdlrm
warnings.cpython-36.pyc132730644editdlrm
wave.cpython-36.opt-1.pyc178480644editdlrm
wave.cpython-36.opt-2.pyc118570644editdlrm
wave.cpython-36.pyc179000644editdlrm
weakref.cpython-36.opt-1.pyc191280644editdlrm
weakref.cpython-36.opt-2.pyc158280644editdlrm
weakref.cpython-36.pyc191580644editdlrm
webbrowser.cpython-36.opt-1.pyc157790644editdlrm
webbrowser.cpython-36.opt-2.pyc139100644editdlrm
webbrowser.cpython-36.pyc158120644editdlrm
xdrlib.cpython-36.opt-1.pyc83170644editdlrm
xdrlib.cpython-36.opt-2.pyc78320644editdlrm
xdrlib.cpython-36.pyc83170644editdlrm
zipapp.cpython-36.opt-1.pyc55490644editdlrm
zipapp.cpython-36.opt-2.pyc43730644editdlrm
zipapp.cpython-36.pyc55490644editdlrm
zipfile.cpython-36.opt-1.pyc486170644editdlrm
zipfile.cpython-36.opt-2.pyc421140644editdlrm
zipfile.cpython-36.pyc486850644editdlrm
_bootlocale.cpython-36.opt-1.pyc9670644editdlrm
_bootlocale.cpython-36.opt-2.pyc7420644editdlrm
_bootlocale.cpython-36.pyc9950644editdlrm
_collections_abc.cpython-36.opt-1.pyc288120644editdlrm
_collections_abc.cpython-36.opt-2.pyc236600644editdlrm
_collections_abc.cpython-36.pyc288120644editdlrm
_compat_pickle.cpython-36.opt-1.pyc65230644editdlrm
_compat_pickle.cpython-36.opt-2.pyc65230644editdlrm
_compat_pickle.cpython-36.pyc65810644editdlrm
_compression.cpython-36.opt-1.pyc41190644editdlrm
_compression.cpython-36.opt-2.pyc39030644editdlrm
_compression.cpython-36.pyc41190644editdlrm
_dummy_thread.cpython-36.opt-1.pyc48660644editdlrm
_dummy_thread.cpython-36.opt-2.pyc26580644editdlrm
_dummy_thread.cpython-36.pyc48660644editdlrm
_markupbase.cpython-36.opt-1.pyc78370644editdlrm
_markupbase.cpython-36.opt-2.pyc74570644editdlrm
_markupbase.cpython-36.pyc80060644editdlrm
_osx_support.cpython-36.opt-1.pyc97210644editdlrm
_osx_support.cpython-36.opt-2.pyc72720644editdlrm
_osx_support.cpython-36.pyc97210644editdlrm
_pydecimal.cpython-36.opt-1.pyc1634170644editdlrm
_pydecimal.cpython-36.opt-2.pyc820100644editdlrm
_pydecimal.cpython-36.pyc1634170644editdlrm
_pyio.cpython-36.opt-1.pyc713830644editdlrm
_pyio.cpython-36.opt-2.pyc489880644editdlrm
_pyio.cpython-36.pyc714010644editdlrm
_sitebuiltins.cpython-36.opt-1.pyc34500644editdlrm
_sitebuiltins.cpython-36.opt-2.pyc29260644editdlrm
_sitebuiltins.cpython-36.pyc34500644editdlrm
_strptime.cpython-36.opt-1.pyc159780644editdlrm
_strptime.cpython-36.opt-2.pyc122480644editdlrm
_strptime.cpython-36.pyc159780644editdlrm
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-36.opt-1.pyc198750644editdlrm
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-36.opt-2.pyc198750644editdlrm
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-36.pyc198750644editdlrm
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-1.pyc195440644editdlrm
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.opt-2.pyc195440644editdlrm
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc195440644editdlrm
_threading_local.cpython-36.opt-1.pyc64400644editdlrm
_threading_local.cpython-36.opt-2.pyc31250644editdlrm
_threading_local.cpython-36.pyc64400644editdlrm
_weakrefset.cpython-36.opt-1.pyc78430644editdlrm
_weakrefset.cpython-36.opt-2.pyc78430644editdlrm
_weakrefset.cpython-36.pyc78430644editdlrm
__future__.cpython-36.opt-1.pyc41820644editdlrm
__future__.cpython-36.opt-2.pyc22060644editdlrm
__future__.cpython-36.pyc41820644editdlrm
__phello__.foo.cpython-36.opt-1.pyc1340644editdlrm
__phello__.foo.cpython-36.opt-2.pyc1340644editdlrm
__phello__.foo.cpython-36.pyc1340644editdlrm
Edit: /opt/alt/python36/lib64/python3.6/__pycache__/doctest.cpython-36.opt-1.pyc (75359B)
3 cfǗ!@stdZdZdddddddd d d d d ddddddddddddddddddd d!d"g!Zd#d$lZd#d$lZd#d$lZd#d$lZd#d$lZd#d$lZd#d$l Z d#d$l Z d#d$l Z d#d$l Z d#d$l Z d#d%lmZd#d&lmZed'd(ZiZd)dZedZedZedZedZedZedZeeBeBeBeBeBZed Zed Zed Zed ZedZ eeBeBeBe BZ!d*Z"d+Z#d,d-Z$dqd/d0Z%d1d2Z&drd4d5Z'd6d7Z(Gd8d9d9eZ)d:d;Z*dd?Z,Gd@dAdAe j-Z.dBdCZ/GdDddZ0GdEddZ1GdFddZ2GdGddZ3GdHddZ4GdIddZ5GdJdde6Z7GdKdde6Z8GdLdde4Z9d$a:dsdOdZ;dMd$d$d$d$dMd#d$dNe2d$f dPdZdSdZ?GdTdUdUe j@ZAGdVdWdWeAZBGdXdYdYe jCZDdudZdZEGd[d\d\eAZFdMd$d$e2d$fd]d^ZGd_dZHd`dZIdad ZJdvdbd!ZKdwdcddZLdxded"ZMGdfdgdgZNeNdhdidjdkdldmZOdndoZPeQdpkrpe jRePd$S)yaModule doctest -- a framework for running examples in docstrings. In simplest use, end each module M to be tested with: def _test(): import doctest doctest.testmod() if __name__ == "__main__": _test() Then running the module as a script will cause the examples in the docstrings to get executed and verified: python M.py This won't display anything unless an example fails, in which case the failing example(s) and the cause(s) of the failure(s) are printed to stdout (why not stderr? because stderr is a lame hack <0.2 wink>), and the final line of output is "Test failed.". Run it with the -v switch instead: python M.py -v and a detailed report of all examples tried is printed to stdout, along with assorted summaries at the end. You can force verbose mode by passing "verbose=True" to testmod, or prohibit it by passing "verbose=False". In either of those cases, sys.argv is not examined by testmod. There are a variety of other ways to run doctests, including integration with the unittest framework, and support for running non-Python text files containing doctests. There are also many ways to override parts of doctest's default behaviors. See the Library Reference Manual for details. zreStructuredText enregister_optionflagDONT_ACCEPT_TRUE_FOR_1DONT_ACCEPT_BLANKLINENORMALIZE_WHITESPACEELLIPSISSKIPIGNORE_EXCEPTION_DETAILCOMPARISON_FLAGS REPORT_UDIFF REPORT_CDIFF REPORT_NDIFFREPORT_ONLY_FIRST_FAILUREREPORTING_FLAGS FAIL_FASTExampleDocTest DocTestParser DocTestFinder DocTestRunner OutputCheckerDocTestFailureUnexpectedException DebugRunnertestmodtestfilerun_docstring_examples DocTestSuite DocFileSuiteset_unittest_reportflagsscript_from_examples testsource debug_srcdebugN)StringIO) namedtuple TestResultszfailed attemptedcCstj|dtt>S)N)OPTIONFLAGS_BY_NAME setdefaultlen)namer+,/opt/alt/python36/lib64/python3.6/doctest.pyrsz z...cCs<d}x2tjD](}|j|d}|tt|kr ||jO}q W|S)z Return the compiler-flags associated with the future features that have been imported into the given namespace (globs). r"N) __future__Zall_feature_namesgetgetattrZ compiler_flag)globsflagsZfnameZfeaturer+r+r,_extract_future_flagss   r2cCsVtj|r|St|tr,t|ttdgS|dkrJtjtj |j dSt ddS)a Return the module specified by `module`. In particular: - If `module` is a module, then return module. - If `module` is a string, then import and return the module with that name. - If `module` is None, then return the calling module. The calling module is assumed to be the module of the stack frame at the given depth in the call stack. *N__name__z"Expected a module, string, or None) inspectismodule isinstancestr __import__globalslocalssysmodules _getframe f_globals TypeError)moduleZdepthr+r+r,_normalize_modules  rCc Cs|r\t|d}t||}t|dddk r\t|jdr\|jj|}|j|}|jtj d|fSt ||d}|j |fSQRXdS)N __loader__get_data )encoding) rC_module_relative_pathr/hasattrrErFdecodereplaceoslinesepopenread)filenamepackagemodule_relativerHZ file_contentsfr+r+r,_load_testfiles     rUcCstjd|d|S)z~ Add the given number of space characters to the beginning of every non-blank line in `s`, and return the result. z (?m)^(?!$) )resub)sindentr+r+r,_indentsr\cCs*t}|\}}}tj||||d|jS)zz Return a string containing a traceback message for the given exc_info tuple (as returned by sys.exc_info()). )file)r# tracebackprint_exceptiongetvalue)exc_infoZexcoutexc_typeZexc_valZexc_tbr+r+r,_exception_tracebacks rcc@seZdZddZdddZdS) _SpoofOutcCs&tj|}|r"|jd r"|d7}|S)NrG)r#r`endswith)selfresultr+r+r,r`s z_SpoofOut.getvalueNcCs|j|tj|dS)N)seekr#truncate)rfsizer+r+r,ris z_SpoofOut.truncate)N)r5 __module__ __qualname__r`rir+r+r+r,rds rdcCst|kr||kS|jt}dt|}}|d}|rR|j|rNt|}|d=ndS|d}|r|j|r||t|8}|d=ndS||krdSx2|D]*}|j|||}|dkrdS|t|7}qWdS)z_ Essentially the only subtle case: >>> _ellipsis_match('aa...aa', 'aaa') False r"Fr&Trm)ELLIPSIS_MARKERsplitr) startswithrefind)wantgotZwsstartposendposwr+r+r,_ellipsis_matchs0     rwcCs|j}|rd|SdSdS)z)Return a commented form of the given linez# #N)rstrip)liner+r+r, _comment_line9sr{cCshdt|}}|jd}|dkr$|}|jdd|}|dkr>|}|jdd|}|dkr\|d}|||S)Nr"rG:.r&)r)rqrfind)msgstartendir+r+r,_strip_exception_detailsAs  rc@s2eZdZdZddZd ddZddZd d ZdS) _OutputRedirectingPdbz A specialized version of the python debugger that redirects stdout to a given stream when interacting with the user. Stdout is *not* redirected when traced code is executed. cCs(||_d|_tjj||ddd|_dS)NFT)stdoutnosigintr&)_OutputRedirectingPdb__out$_OutputRedirectingPdb__debugger_usedpdbPdb__init__Z use_rawinput)rfoutr+r+r,rasz_OutputRedirectingPdb.__init__NcCs*d|_|dkrtjj}tjj||dS)NT)rr=r?f_backrr set_trace)rfframer+r+r,ris z_OutputRedirectingPdb.set_tracecCs|jrtjj|dS)N)rrr set_continue)rfr+r+r,rosz"_OutputRedirectingPdb.set_continuec Gs.tj}|jt_ztjj|f|S|t_XdS)N)r=rrrrtrace_dispatch)rfargs save_stdoutr+r+r,rus z$_OutputRedirectingPdb.trace_dispatch)N)r5rkrl__doc__rrrrr+r+r+r,r[s  rcCstj|std||jdr(tdtjj|jd}t |drXtjj|j d}n|j dkrt t jdkrt jddkrtjjt jdd}qtj}nFt |drx,|jD]"}tjj||}tjj|r|SqWtd |j tjj||S) NzExpected a module: %r/z1Module-relative files may not have absolute paths__file__r"__main____path__zBCan't resolve paths relative to the module %r (it has no __file__))r6r7rArp ValueErrorrMpathjoinrorJrr5r)r=argvcurdirrexists)rBZ test_pathZbasedirZ directoryZfullpathr+r+r,rIs&         rIc@s*eZdZdZd ddZddZdd ZdS) ran A single doctest example, consisting of source code and expected output. `Example` defines the following attributes: - source: A single Python statement, always ending with a newline. The constructor adds a newline if needed. - want: The expected output from running the source code (either from stdout, or a traceback in case of exception). `want` ends with a newline unless it's empty, in which case it's an empty string. The constructor adds a newline if needed. - exc_msg: The exception message generated by the example, if the example is expected to generate an exception; or `None` if it is not expected to generate an exception. This exception message is compared against the return value of `traceback.format_exception_only()`. `exc_msg` ends with a newline unless it's `None`. The constructor adds a newline if needed. - lineno: The line number within the DocTest string containing this Example where the Example begins. This line number is zero-based, with respect to the beginning of the DocTest. - indent: The example's indentation in the DocTest string. I.e., the number of space characters that precede the example's first prompt. - options: A dictionary mapping from option flags to True or False, which is used to override default options for this example. Any option flags not contained in this dictionary are left at their default value (as specified by the DocTestRunner's optionflags). By default, no options are set. Nr"cCsz|jds|d7}|r*|jd r*|d7}|dk rF|jd rF|d7}||_||_||_||_|dkrji}||_||_dS)NrG)resourcerrlinenor[optionsexc_msg)rfrrrrrr[rr+r+r,rs zExample.__init__cCs\t|t|k rtS|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkS)N)typeNotImplementedrrrrr[rr)rfotherr+r+r,__eq__s     zExample.__eq__cCst|j|j|j|j|jfS)N)hashrrrrr[r)rfr+r+r,__hash__szExample.__hash__)Nr"r"N)r5rkrlrrrrr+r+r+r,rs "  c@s8eZdZdZddZddZddZdd Zd d Zd S) rae A collection of doctest examples that should be run in a single namespace. Each `DocTest` defines the following attributes: - examples: the list of examples. - globs: The namespace (aka globals) that the examples should be run in. - name: A name identifying the DocTest (typically, the name of the object whose docstring this DocTest was extracted from). - filename: The name of the file that this DocTest was extracted from, or `None` if the filename is unknown. - lineno: The line number within filename where this DocTest begins, or `None` if the line number is unavailable. This line number is zero-based, with respect to the beginning of the file. - docstring: The string that the examples were extracted from, or `None` if the string is unavailable. cCs,||_||_|j|_||_||_||_dS)z Create a new DocTest containing the given examples. The DocTest's globals are initialized with a copy of `globs`. N)examples docstringcopyr0r*rQr)rfrr0r*rQrrr+r+r,r s  zDocTest.__init__cCsRt|jdkrd}n"t|jdkr(d}ndt|j}d|jj|j|j|j|fS)Nr"z no examplesr&z 1 examplez %d examplesz<%s %s from %s:%s (%s)>)r)r __class__r5r*rQr)rfrr+r+r,__repr__szDocTest.__repr__cCs\t|t|k rtS|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkS)N)rrrrr0r*rQr)rfrr+r+r,r#s     zDocTest.__eq__cCst|j|j|j|jfS)N)rrr*rQr)rfr+r+r,r.szDocTest.__hash__cCs:t|tstS|j|j|jt|f|j|j|jt|fkS)N)r8rrr*rQrid)rfrr+r+r,__lt__2s zDocTest.__lt__N) r5rkrlrrrrrrr+r+r+r,rs   c@seZdZdZejdejejBZejdejejBej BZ ejdj Z dddZ dd Zdd d Zd d ZejdejZddZejdejZddZddZddZdS)rzD A class used to parse strings containing doctest examples. a # Source consists of a PS1 line followed by zero or more PS2 lines. (?P (?:^(?P [ ]*) >>> .*) # PS1 line (?:\n [ ]* \.\.\. .*)*) # PS2 lines \n? # Want consists of any non-blank lines that do not start with PS1. (?P (?:(?![ ]*$) # Not a blank line (?![ ]*>>>) # Not a line starting with PS1 .+$\n? # But any other line )*) a # Grab the traceback header. Different versions of Python have # said different things on the first traceback line. ^(?P Traceback\ \( (?: most\ recent\ call\ last | innermost\ last ) \) : ) \s* $ # toss trailing whitespace on the header. (?P .*?) # don't blink: absorb stuff until... ^ (?P \w+ .*) # a line *starts* with alphanum. z ^[ ]*(#.*)?$c s|j}|j|dkr8djfdd|jdD}g}d\}}x|jj|D]}|j|||j||jd||j7}|j |||\}}} } |j |s|jt || | |t |j d|d||jd|j|j7}|j}qRW|j||d|S) a= Divide the given string into examples and intervening text, and return them as a list of alternating Examples and strings. Line numbers for the Examples are 0-based. The optional argument `name` is a name identifying this string, and is only used for error messages. r"rGcsg|]}|dqS)Nr+).0l) min_indentr+r, ysz'DocTestParser.parse..r[)rr[rN)r"r") expandtabs _min_indentrro _EXAMPLE_REfinditerappendrcount_parse_example_IS_BLANK_OR_COMMENTrr)groupr) rfstringr*outputZcharnormrrrrrr+)rr,parsems&     zDocTestParser.parsecCst|j|||||||S)a" Extract all doctest examples from the given string, and collect them into a `DocTest` object. `globs`, `name`, `filename`, and `lineno` are attributes for the new `DocTest` object. See the documentation for `DocTest` for more information. )r get_examples)rfrr0r*rQrr+r+r, get_doctests zDocTestParser.get_doctestcCsdd|j||DS)a Extract all doctest examples from the given string, and return them as a list of `Example` objects. Line numbers are 0-based, because it's most common in doctests that nothing interesting appears on the same line as opening triple-quote, and so the first interesting line is called "line 1" then. The optional argument `name` is a name identifying this string, and is only used for error messages. cSsg|]}t|tr|qSr+)r8r)rxr+r+r,rsz.DocTestParser.get_examples..)r)rfrr*r+r+r,rs zDocTestParser.get_examplesc s t|jd|jdjd}|j||||j|dddd||djfdd |D}|jd }|jd}t|dkrtjd |dr|d=|j|d||t|djfd d |D}|jj|}|r|jd }nd}|j |||} || ||fS)a Given a regular expression match from `_EXAMPLE_RE` (`m`), return a pair `(source, want)`, where `source` is the matched example's source code (with prompts and indentation stripped); and `want` is the example's expected output (with indentation stripped). `name` is the string's name, and `lineno` is the line number where the example starts; both are used for error messages. r[rrGr&NrWr}csg|]}|ddqS)rVNr+)rZsl)r[r+r,rsz0DocTestParser._parse_example..rrz *$csg|]}|dqS)Nr+)rZwl)r[r+r,rsrrmrm) r)rro_check_prompt_blank _check_prefixrrXmatch _EXCEPTION_RE _find_options) rfrr*r source_linesrrr want_linesrrr+)r[r,rs$      zDocTestParser._parse_examplez#\s*doctest:\s*([^\n\'"]*)$c Csi}x|jj|D]z}|jdjddj}x^|D]V}|ddksR|ddtkrhtd|d||ft|dd}|ddk||<q2WqW|r|j|rtd |||f|S) a Return a dictionary containing option overrides extracted from option directives in the given source string. `name` is the string's name, and `lineno` is the line number where the example starts; both are used for error messages. r&,rWr"z+-Nz7line %r of the doctest for %s has an invalid option: %r+zSline %r of the doctest for %s has an option directive on a line with no example: %r)_OPTION_DIRECTIVE_RErrrLror'rr) rfrr*rrrZoption_stringsoptionflagr+r+r,rs  zDocTestParser._find_optionsz ^([ ]*)(?=\S)cCs2dd|jj|D}t|dkr*t|SdSdS)z;Return the minimum indentation of any non-blank line in `s`cSsg|] }t|qSr+)r))rr[r+r+r,rsz-DocTestParser._min_indent..r"N) _INDENT_REfindallr)min)rfrZindentsr+r+r,rs zDocTestParser._min_indentc Csbx\t|D]P\}}t||dkr ||ddkr td||d||||d|fq WdS)a  Given the lines of a source string (including prompts and leading indentation), check to make sure that every prompt is followed by a space character. If any line is not followed by a space character, then raise ValueError. rVrDrWz8line %r of the docstring for %s lacks blank after %s: %rr&N) enumerater)r)rflinesr[r*rrrzr+r+r,r s   z!DocTestParser._check_prompt_blankcCsDx>t|D]2\}}|r |j| r td||d||fq WdS)z Check that every line in the given list starts with the given prefix; if any line does not, then raise a ValueError. zGline %r of the docstring for %s has inconsistent leading whitespace: %rr&N)rrpr)rfrprefixr*rrrzr+r+r,rszDocTestParser._check_prefixN)r)r)r5rkrlrrXcompile MULTILINEVERBOSErDOTALLrrrrrrrrrrrrrr+r+r+r,r=s"     ' 3c@sNeZdZdZdeddfddZdddZd d Zd d Zd dZ ddZ dS)ra< A class used to extract the DocTests that are relevant to a given object, from its docstring and the docstrings of its contained objects. Doctests can currently be extracted from the following object types: modules, functions, classes, methods, staticmethods, classmethods, and properties. FTcCs||_||_||_||_dS)at Create a new doctest finder. The optional argument `parser` specifies a class or function that should be used to create new DocTest objects (or objects that implement the same interface as DocTest). The signature for this factory function should match the signature of the DocTest constructor. If the optional argument `recurse` is false, then `find` will only examine the given object, and not any contained objects. If the optional argument `exclude_empty` is false, then `find` will include tests for objects with empty docstrings. N)_parser_verbose_recurse_exclude_empty)rfverboseparserrecurse exclude_emptyr+r+r,r1szDocTestFinder.__init__Nc CsP|dkr.t|dd}|dkr.tdt|f|dkrr)r/rrr6 getmoduleZ getsourcefilerAZgetfile linecachegetlines__dict__rupdate_findsort) rfobjr*rBr0 extraglobsr]rtestsr+r+r,rqGsJ$          zDocTestFinder.findcCs|dkr dStj|dk r(|tj|kStj|r>|j|jkStj|r|t|dr\|jj}nt|drn|j}ndS|j |kStj |r|j |jkSt|dr|j |jkSt |t rdSt ddS)zY Return true if the given object is defined in the given module. NT __objclass__rkz"object must be a class or function)r6r isfunctionr __globals__ZismethoddescriptorrJrrkr5isclassr8propertyr)rfrBobjectZobj_modr+r+r, _from_modules(            zDocTestFinder._from_modulec Cs(|jrtd|t||kr"dSd|t|<|j|||||}|dk rR|j|tj|r|jrx^|jj D]P\} } d|| f} tj tj | stj | rn|j || rn|j|| | ||||qnWtj|o|jrtxt|dij D]\} } t| ts tdt| ftj | p8tj | p8tj| p8t| tsNtdt| fd|| f} |j|| | ||||qWtj |r$|jr$x|jj D]\} } t| trt|| } t| trt|| j} tj | stj | st| tr|j || rd|| f} |j|| | ||||qWdS) zm Find tests for the given object and any contained objects, and add them to `tests`. zFinding tests in %sNr&z%s.%s__test__z5DocTestFinder.find: __test__ keys must be strings: %rz`DocTestFinder.find: __test__ values must be strings, functions, methods, classes, or modules: %rz%s.__test__.%s)rprintr _get_testrr6r7rritemsZ isroutineZunwraprrrr/r8r9rr staticmethod classmethod__func__r) rfrrr*rBrr0seentestZvalnamevalr+r+r,rsP                 zDocTestFinder._findc Cst|tr|}nJy,|jdkr"d}n|j}t|ts:t|}Wnttfk rXd}YnX|j||}|jrv| rvdS|dkrd}n*t|d|j}|dddkr|dd}|j j |||||S) zs Return a DocTest for the given object, if it defines a docstring; otherwise, return None. NrrrVz.pycr&rm) r8r9rrAAttributeError _find_linenorr/r5rr) rfrr*rBr0rrrrQr+r+r,rs(         zDocTestFinder._get_testcCsd}tj|rd}tj|rd|dkr(dStjdt|dd}x$t|D]\}}|j|rH|}PqHWtj|rt|j }tj |r|j }tj |r|j }tj|r|j}tj|rt|ddd}|dk r |dkr|dStjd}x(t|t|D]}|j||r|SqWdS) z Return a line number of the given object's docstring. Note: this method assumes that the object has a docstring. Nr"z^\s*class\s*%s\br5-co_firstlinenor&z(^|.*:)\s*\w*("|\'))r6r7rrXrr/rrZismethodrr__code__Z istracebacktb_frameZisframef_codeZiscoderanger))rfrrrZpatrrzr+r+r,r-s<          zDocTestFinder._find_lineno)NNNN) r5rkrlrrrrqrrrrr+r+r+r,r(s f?%c@seZdZdZddZd ddZdd Zd d Zd d ZddZ ddZ ddZ ddZ e jdZd!ddZd"ddZd#ddZddZdS)$ra3 A class used to run DocTest test cases, and accumulate statistics. The `run` method is used to process a single DocTest case. It returns a tuple `(f, t)`, where `t` is the number of test cases tried, and `f` is the number of test cases that failed. >>> tests = DocTestFinder().find(_TestClass) >>> runner = DocTestRunner(verbose=False) >>> tests.sort(key = lambda test: test.name) >>> for test in tests: ... print(test.name, '->', runner.run(test)) _TestClass -> TestResults(failed=0, attempted=2) _TestClass.__init__ -> TestResults(failed=0, attempted=2) _TestClass.get -> TestResults(failed=0, attempted=2) _TestClass.square -> TestResults(failed=0, attempted=1) The `summarize` method prints a summary of all the test cases that have been run by the runner, and returns an aggregated `(f, t)` tuple: >>> runner.summarize(verbose=1) 4 items passed all tests: 2 tests in _TestClass 2 tests in _TestClass.__init__ 2 tests in _TestClass.get 1 tests in _TestClass.square 7 tests in 4 items. 7 passed and 0 failed. Test passed. TestResults(failed=0, attempted=7) The aggregated number of tried examples and failed examples is also available via the `tries` and `failures` attributes: >>> runner.tries 7 >>> runner.failures 0 The comparison between expected outputs and actual outputs is done by an `OutputChecker`. This comparison may be customized with a number of option flags; see the documentation for `testmod` for more information. If the option flags are insufficient, then the comparison may also be customized by passing a subclass of `OutputChecker` to the constructor. The test runner's display output can be controlled in two ways. First, an output function (`out) can be passed to `TestRunner.run`; this function will be called with strings that should be displayed. It defaults to `sys.stdout.write`. If capturing the output is not sufficient, then the display output can be also customized by subclassing DocTestRunner, and overriding the methods `report_start`, `report_success`, `report_unexpected_exception`, and `report_failure`. r4FNr"cCsN|pt|_|dkrdtjk}||_||_||_d|_d|_i|_ t |_ dS)ac Create a new test runner. Optional keyword arg `checker` is the `OutputChecker` that should be used to compare the expected outputs and actual outputs of doctest examples. Optional keyword arg 'verbose' prints lots of stuff if true, only failures if false; by default, it's true iff '-v' is in sys.argv. Optional argument `optionflags` can be used to control how the test runner compares expected output to actual output, and how it displays failures. See the documentation for `testmod` for more information. Nz-vr") r_checkerr=rr optionflagsoriginal_optionflagstriesfailures_name2ftrd_fakeout)rfcheckerrr r+r+r,rs  zDocTestRunner.__init__cCsH|jrD|jr.|dt|jdt|jn|dt|jddS)z Report that the test runner is about to process the given example. (Only displays a message if verbose=True) zTrying: z Expecting: zExpecting nothing N)rrrr\r)rfrrexampler+r+r, report_starts  zDocTestRunner.report_startcCs|jr|ddS)zt Report that the given example ran successfully. (Only displays a message if verbose=True) zok N)r)rfrrrrsr+r+r,report_successszDocTestRunner.report_successcCs&||j|||jj|||jdS)z7 Report that the given example failed. N)_failure_headerr output_differencer )rfrrrrsr+r+r,report_failures zDocTestRunner.report_failurecCs$||j||dtt|dS)zO Report that the given example raised an unexpected exception. zException raised: N)rr\rc)rfrrrrar+r+r,report_unexpected_exceptionsz)DocTestRunner.report_unexpected_exceptioncCs|jg}|jrR|jdk r4|jdk r4|j|jd}nd}|jd|j||jfn|jd|jd|jf|jd|j}|jt|dj|S)Nr&?zFile "%s", line %s, in %szLine %s, in %szFailed example:rG)DIVIDERrQrrr*rr\r)rfrrrrrr+r+r,rs zDocTestRunner._failure_headercCsd}}|j}td\}}} |jj} xFt|jD]6\} } |jt@oL|dk} ||_| jrx:| jjD],\}}|r|j|O_qf|j|M_qfW|jt @rq2|d7}| s|j ||| d|j | f}y,t t | j|d|d|j|jjd}Wn4tk rYntj}|jjYnX|jj}|jjd|}|dkrh| | j||jr|}n|tj|ddd}| s|t|7}| jdkr| }nB| | j||jr|}n*|jt@r| t| jt||jr|}||kr| sZ|j||| |nT||kr0| s&|j ||| ||d7}n*|| krZ| sP|j!||| ||d7}n|r2|jt"@r2Pq2W||_|j#|||t$||S) a Run the examples in `test`. Write the outcome of each example with one of the `DocTestRunner.report_*` methods, using the writer function `out`. `compileflags` is the set of compiler flags that should be used to execute examples. Return a tuple `(f, t)`, where `t` is the number of examples tried, and `f` is the number of examples that failed. The examples are run in the namespace `test.globs`. r"rDr&zZsingleNr3rm)%r r r  check_outputrrr rrrrr*execrrr0debuggerrKeyboardInterruptr=rarr`rirrr^format_exception_onlyrcrrrrrrr_DocTestRunner__record_outcomer%)rfr compileflagsrrrr SUCCESSFAILUREZBOOMZcheck examplenumrquietZ optionflagrrQZ exceptionrsZoutcomerr+r+r,Z__runs                   zDocTestRunner.__runcCsL|jj|jd\}}||||f|j|j<|j|7_|j|7_dS)z{ Record the fact that the given DocTest (`test`) generated `f` failures out of `t` tried examples. r"N)r"r")rr.r*rr)rfrrTtf2t2r+r+r,Z__record_outcomeuszDocTestRunner.__record_outcomez..+)\[(?P\d+)\]>$cCsV|jj|}|rF|jd|jjkrF|jjt|jd}|jjddS|j ||SdS)Nr*r%T)keepends) %_DocTestRunner__LINECACHE_FILENAME_RErrrr*rintr splitlinessave_linecache_getlines)rfrQmodule_globalsrrr+r+r,Z__patched_linecache_getliness  z*DocTestRunner.__patched_linecache_getlinesTc s||_|dkrt|j}tj|dkrVjdks@jdkrHj}nfdd}|jt_tj }t j }t |_ |j j|j j t _ tj|_|jt_tj}tjt_z|j|||St_|t _ tj||jt_|t_|r|jjddl}d|_XdS)aJ Run the examples in `test`, and display the results using the writer function `out`. The examples are run in the namespace `test.globs`. If `clear_globs` is true (the default), then this namespace will be cleared after the test runs, to help with garbage collection. If you would like to examine the namespace after the test completes, then use `clear_globs=False`. `compileflags` gives the set of flags that should be used by the Python compiler when running the examples. If not specified, then it will default to the set of future-import flags that apply to `globs`. The output of each example is checked using `DocTestRunner.check_output`, and the results are formatted by the `DocTestRunner.report_*` methods. Nzutf-8cs t|jd}j|dS)Nbackslashreplace)r9encodewrite)rZ)rHrr+r,rszDocTestRunner.run..outr")rr2r0r=rrHlowerr2rgettracerrrrresetrrr.*_DocTestRunner__patched_linecache_getlines displayhook__displayhook___DocTestRunner__runsettraceclearbuiltins_) rfrr"r clear_globsZ save_traceZsave_set_traceZsave_displayhookr<r+)rHrr,runs<      zDocTestRunner.runc Cs|dkr|j}g}g}g}d}}xd|jjD]V}|\}\} } || 7}|| 7}| dkrb|j|q.| dkrz|j|| fq.|j|q.W|r|rtt|d|jx|D]} td| qW|rtt|d|jx |D]\} } td| | fqW|rJt|jtt|d|jx(|D] \} \} } td| | | fq&W|rvt|d t|jd t||d |d |rtd |dn|rtdt||S)a Print a summary of all the test cases that have been run by this DocTestRunner, and return a tuple `(f, t)`, where `f` is the total number of failed examples, and `t` is the total number of tried examples. The optional `verbose` argument controls how detailed the summary is. If the verbosity is not specified, then the DocTestRunner's verbosity is used. Nr"zitems had no tests:z zitems passed all tests:z %3d tests in %szitems had failures:z %3d of %3d in %sztests inzitems.z passed andzfailed.z***Test Failed***z failures.z Test passed.) rrrrrr)rrr%) rfrZnotestsZpassedZfailedZtotaltZtotalfrr*rTr'thingrr+r+r, summarizesP     zDocTestRunner.summarizecCsV|j}xJ|jjD]<\}\}}||krB||\}}||}||}||f||<qWdS)N)rr)rfrdr*rTr'r(r)r+r+r,merge s zDocTestRunner.merge)NNr")N)NNT)N)r5rkrlrrrrrrrrr9r!rXrr+r6r?rArCr+r+r+r,ras7 $ }   I 9c@s0eZdZdZddZddZddZdd Zd S) ra_ A class used to check the whether the actual output from a doctest example matches the expected output. `OutputChecker` defines two methods: `check_output`, which compares a given pair of outputs, and returns true if they match; and `output_difference`, which returns a string describing the differences between two outputs. cCst|jdddS)z= Convert string to hex-escaped ASCII string. ASCIIr0)r9r1)rfrZr+r+r,_toAscii!szOutputChecker._toAsciicCs|j|}|j|}||kr dS|t@sH||fd kr8dS||fd krHdS|t@stjdtjtd|}tjdd|}||krdS|t@rd j|j }d j|j }||krdS|t @rt ||rdSd S) a Return True iff the actual output from an example (`got`) matches the expected output (`want`). These strings are always considered to match if they are identical; but depending on what option flags the test runner is using, several non-exact match types are also possible. See the documentation for `TestRunner` for more information about option flags. TTrue 1 False 0 z (?m)^%s\s*?$rz (?m)^\s*?$rWF)rFrG)rHrI) rErrrXrYescapeBLANKLINE_MARKERrrrorrw)rfrrrsr r+r+r,r's0     zOutputChecker.check_outputcCs<|ttBtB@sdS|t@r dS|jddko:|jddkS)NFTrGr3)r r r r)rfrrrsr r+r+r,_do_a_fancy_difffs zOutputChecker._do_a_fancy_diffc Cs8|j}|t@stjdt|}|j|||r|jdd}|jdd}|t@rptj ||dd}t |dd}d}nZ|t @rtj ||dd}t |dd}d}n,|t @rtjtjd } t | j||}d }nd d |D}d |tdj|S|o|r dt|t|fS|rdt|S|r0dt|SdSdS)z Return a string describing the differences between the expected output for a given example (`example`) and the actual output (`got`). `optionflags` is the set of option flags used to compare `want` and `got`. z(?m)^[ ]*(?= )T)r*r3)nNz#unified diff with -expected +actualz-context diff with expected followed by actual)Zcharjunkzndiff with -expected +actualcSsg|]}|jdqS)rG)ry)rrzr+r+r,rsz3OutputChecker.output_difference..zDifferences (%s): rzExpected: %sGot: %szExpected: %sGot nothing zExpected nothing Got: %szExpected nothing Got nothing )rrrrXrYrKrLr-r difflibZ unified_difflistr Z context_diffr ZDifferZIS_CHARACTER_JUNKZcomparer\r) rfrrsr rrrZ got_linesZdiffZkindZenginer+r+r,r}s6     zOutputChecker.output_differenceN)r5rkrlrrErrLrr+r+r+r,rs ?c@s eZdZdZddZddZdS)rzA DocTest example has failed in debugging mode. The exception instance has variables: - test: the DocTest object being run - example: the Example object that failed - got: the actual output cCs||_||_||_dS)N)rrrs)rfrrrsr+r+r,rszDocTestFailure.__init__cCs t|jS)N)r9r)rfr+r+r,__str__szDocTestFailure.__str__N)r5rkrlrrrPr+r+r+r,rs c@s eZdZdZddZddZdS)rzA DocTest example has encountered an unexpected exception The exception instance has variables: - test: the DocTest object being run - example: the Example object that failed - exc_info: the exception info cCs||_||_||_dS)N)rrra)rfrrrar+r+r,rszUnexpectedException.__init__cCs t|jS)N)r9r)rfr+r+r,rPszUnexpectedException.__str__N)r5rkrlrrrPr+r+r+r,rs c@s*eZdZdZd ddZddZdd ZdS) ra Run doc tests but raise an exception as soon as there is a failure. If an unexpected exception occurs, an UnexpectedException is raised. It contains the test, the example, and the original exception: >>> runner = DebugRunner(verbose=False) >>> test = DocTestParser().get_doctest('>>> raise KeyError\n42', ... {}, 'foo', 'foo.py', 0) >>> try: ... runner.run(test) ... except UnexpectedException as f: ... failure = f >>> failure.test is test True >>> failure.example.want '42\n' >>> exc_info = failure.exc_info >>> raise exc_info[1] # Already has the traceback Traceback (most recent call last): ... KeyError We wrap the original exception to give the calling application access to the test and example information. If the output doesn't match, then a DocTestFailure is raised: >>> test = DocTestParser().get_doctest(''' ... >>> x = 1 ... >>> x ... 2 ... ''', {}, 'foo', 'foo.py', 0) >>> try: ... runner.run(test) ... except DocTestFailure as f: ... failure = f DocTestFailure objects provide access to the test: >>> failure.test is test True As well as to the example: >>> failure.example.want '2\n' and the actual output: >>> failure.got '1\n' If a failure or error occurs, the globals are left intact: >>> del test.globs['__builtins__'] >>> test.globs {'x': 1} >>> test = DocTestParser().get_doctest(''' ... >>> x = 2 ... >>> raise KeyError ... ''', {}, 'foo', 'foo.py', 0) >>> runner.run(test) Traceback (most recent call last): ... doctest.UnexpectedException: >>> del test.globs['__builtins__'] >>> test.globs {'x': 2} But the globals are cleared if there is no error: >>> test = DocTestParser().get_doctest(''' ... >>> x = 2 ... ''', {}, 'foo', 'foo.py', 0) >>> runner.run(test) TestResults(failed=0, attempted=1) >>> test.globs {} NTcCs$tj||||d}|r |jj|S)NF)rr?r0r;)rfrr"rr>rr+r+r,r?.s zDebugRunner.runcCst|||dS)N)r)rfrrrrar+r+r,r4sz'DebugRunner.report_unexpected_exceptioncCst|||dS)N)r)rfrrrrsr+r+r,r7szDebugRunner.report_failure)NNT)r5rkrlrr?rrr+r+r+r,rsY TFc Cs|dkrtjjd}tj|s,td|f|dkr:|j}t|d} |rVt||d} n t ||d} x$| j ||||dD]} | j | qvW|r| j t dkr| a n t j| t| j| jS)a* m=None, name=None, globs=None, verbose=None, report=True, optionflags=0, extraglobs=None, raise_on_error=False, exclude_empty=False Test examples in docstrings in functions and classes reachable from module m (or the current module if m is not supplied), starting with m.__doc__. Also test examples reachable from dict m.__test__ if it exists and is not None. m.__test__ maps names to functions, classes and strings; function and class docstrings are tested even if the name is private; strings are tested directly, as if they were docstrings. Return (#failures, #tests). See help(doctest) for an overview. Optional keyword arg "name" gives the name of the module; by default use m.__name__. Optional keyword arg "globs" gives a dict to be used as the globals when executing examples; by default, use m.__dict__. A copy of this dict is actually used for each docstring, so that each docstring's examples start with a clean slate. Optional keyword arg "extraglobs" gives a dictionary that should be merged into the globals that are used to execute examples. By default, no extra globals are used. This is new in 2.4. Optional keyword arg "verbose" prints lots of stuff if true, prints only failures if false; by default, it's true iff "-v" is in sys.argv. Optional keyword arg "report" prints a summary at the end when true, else prints nothing at the end. In verbose mode, the summary is detailed, else very brief (in fact, empty if all tests passed). Optional keyword arg "optionflags" or's together module constants, and defaults to 0. This is new in 2.3. Possible values (see the docs for details): DONT_ACCEPT_TRUE_FOR_1 DONT_ACCEPT_BLANKLINE NORMALIZE_WHITESPACE ELLIPSIS SKIP IGNORE_EXCEPTION_DETAIL REPORT_UDIFF REPORT_CDIFF REPORT_NDIFF REPORT_ONLY_FIRST_FAILURE Optional keyword arg "raise_on_error" raises an exception on the first unexpected exception or failure. This allows failures to be post-mortem debugged. Advanced tomfoolery: testmod runs methods of a local instance of class doctest.Tester, then merges the results into (or creates) global Tester instance doctest.master. Methods of doctest.master can be called directly too, if you want to do something unusual. Passing report=0 to testmod is especially useful then, to delay displaying a summary. Invoke doctest.master.summarize(verbose) when you're done fiddling. Nrztestmod: module required; %r)r)rr )r0r)r=r>r.r6r7rAr5rrrrqr?rAmasterrCr%rr) rr*r0rreportr rraise_on_errorrfinderrunnerrr+r+r,rCs$E     c Cs|r| rtdt|||| p d\} }|dkr>> import doctest >>> old = doctest._unittest_reportflags >>> doctest.set_unittest_reportflags(REPORT_NDIFF | ... REPORT_ONLY_FIRST_FAILURE) == old True >>> doctest._unittest_reportflags == (REPORT_NDIFF | ... REPORT_ONLY_FIRST_FAILURE) True Only reporting flags can be set: >>> doctest.set_unittest_reportflags(ELLIPSIS) Traceback (most recent call last): ... ValueError: ('Only reporting flags allowed', 8) >>> doctest.set_unittest_reportflags(old) == (REPORT_NDIFF | ... REPORT_ONLY_FIRST_FAILURE) True zOnly reporting flags allowed)r r_unittest_reportflags)r1oldr+r+r,rCs   c@sjeZdZdddZddZddZd d Zd d Zd dZddZ ddZ ddZ ddZ e Z ddZdS) DocTestCaser"NcCs.tjj|||_||_||_||_||_dS)N)unittestTestCaser_dt_optionflags _dt_checker_dt_test _dt_setUp _dt_tearDown)rfrr setUptearDownrr+r+r,ris  zDocTestCase.__init__cCs|j}|jdk r|j|dS)N)rarb)rfrr+r+r,rdss zDocTestCase.setUpcCs(|j}|jdk r|j||jjdS)N)rarcr0r;)rfrr+r+r,reys  zDocTestCase.tearDownc Cs|j}tj}t}|j}|t@s(|tO}t||jdd}z$dd|_ |j ||j dd\}}Wd|t_X|r~|j |j |jdS)NF)r rrrr )rr>)rar=rr#r_r rZrr`rr?r2ZfailureExceptionformat_failurer`)rfrr[newr rVrrr+r+r,runTests  zDocTestCase.runTestcCsP|j}|jdkrd}n d|j}dj|jjddd}d|j|j|||fS)Nzunknown line numberz%sr}r&z:Failed doctest test for %s File "%s", line %s, in %s %srm)rarrr*rorQ)rferrrrZlnamer+r+r,rfs  zDocTestCase.format_failurecCs6|jt|j|jdd}|j|jdd|jdS)aRun the test case without results and without catching exceptions The unit test framework includes a debug method on test cases and test suites to support post-mortem debugging. The test code is run in such a way that errors are not caught. This way a caller can catch the errors and initiate post-mortem debugging. The DocTestCase provides a debug method that raises UnexpectedException errors if there is an unexpected exception: >>> test = DocTestParser().get_doctest('>>> raise KeyError\n42', ... {}, 'foo', 'foo.py', 0) >>> case = DocTestCase(test) >>> try: ... case.debug() ... except UnexpectedException as f: ... failure = f The UnexpectedException contains the test, the example, and the original exception: >>> failure.test is test True >>> failure.example.want '42\n' >>> exc_info = failure.exc_info >>> raise exc_info[1] # Already has the traceback Traceback (most recent call last): ... KeyError If the output doesn't match, then a DocTestFailure is raised: >>> test = DocTestParser().get_doctest(''' ... >>> x = 1 ... >>> x ... 2 ... ''', {}, 'foo', 'foo.py', 0) >>> case = DocTestCase(test) >>> try: ... case.debug() ... except DocTestFailure as f: ... failure = f DocTestFailure objects provide access to the test: >>> failure.test is test True As well as to the example: >>> failure.example.want '2\n' and the actual output: >>> failure.got '1\n' F)r rr)r>N)rdrr_r`r?rare)rfrVr+r+r,r!s B zDocTestCase.debugcCs|jjS)N)rar*)rfr+r+r,rszDocTestCase.idcCsPt|t|k rtS|j|jkoN|j|jkoN|j|jkoN|j|jkoN|j|jkS)N)rrrar_rbrcr`)rfrr+r+r,rs    zDocTestCase.__eq__cCst|j|j|j|jfS)N)rr_rbrcr`)rfr+r+r,rszDocTestCase.__hash__cCs,|jjjd}d|ddj|ddfS)Nr}z%s (%s)r&rmrm)rar*ror)rfr*r+r+r,rszDocTestCase.__repr__cCs d|jjS)Nz Doctest: )rar*)rfr+r+r,shortDescription szDocTestCase.shortDescription)r"NNN)r5rkrlrrdrerhrfr!rrrrrPrjr+r+r+r,r\gs  H r\c@s0eZdZddZddZddZddZeZd S) SkipDocTestCasecCs||_tj|ddS)N)rBr\r)rfrBr+r+r,r szSkipDocTestCase.__init__cCs|jddS)Nz-DocTestSuite will not work with -O2 and above)ZskipTest)rfr+r+r,rd szSkipDocTestCase.setUpcCsdS)Nr+)rfr+r+r, test_skip szSkipDocTestCase.test_skipcCs d|jjS)NzSkipping tests from %s)rBr5)rfr+r+r,rj sz SkipDocTestCase.shortDescriptionN)r5rkrlrrdrlrjrPr+r+r+r,rk s rkc@seZdZddZdS) _DocTestSuitecCsdS)Nr+)rfindexr+r+r,_removeTestAtIndex sz _DocTestSuite._removeTestAtIndexN)r5rkrlror+r+r+r,rm srmc Ks|dkrt}t|}|j|||d}| rPtjjdkrPt}|jt||S|j t}x\|D]T}t |j dkrxqd|j s|j }|dddkr|dd }||_ |jt|f|qdW|S) a Convert doctest tests for a module to a unittest test suite. This converts each documentation string in a module that contains doctest tests to a unittest test case. If any of the tests in a doc string fail, then the test case fails. An exception is raised showing the name of the file containing the test and a (sometimes approximate) line number. The `module` argument provides the module to be tested. The argument can be either a module or a module name. If no argument is given, the calling module is used. A number of options may be provided as keyword arguments: setUp A set-up function. This is called before running the tests in each file. The setUp function will be passed a DocTest object. The setUp function can access the test globals as the globs attribute of the test passed. tearDown A tear-down function. This is called after running the tests in each file. The tearDown function will be passed a DocTest object. The tearDown function can access the test globals as the globs attribute of the test passed. globs A dictionary containing initial global variables for the tests. optionflags A set of doctest option flags expressed as an integer. N)r0rr3r"rVz.pycr&rrm)rrCrqr=r1optimizermaddTestrkrr)rrQrr\) rBr0rZ test_finderrrsuiterrQr+r+r,r s(%  c@s(eZdZddZddZeZddZdS) DocFileCasecCsdj|jjjdS)Nr=r})rrar*ro)rfr+r+r,r` szDocFileCase.idcCs|jjS)N)rarQ)rfr+r+r,rc szDocFileCase.__repr__cCsd|jj|jj|fS)Nz2Failed doctest test for %s File "%s", line 0 %s)rar*rQ)rfrir+r+r,rfg szDocFileCase.format_failureN)r5rkrlrrrPrfr+r+r+r,rs^ srsc Ksx|dkri}n|j}|r(| r(tdt||||p6d\}}d|krN||d<tjj|}|j||||d} t| f|S)Nz8Package may only be specified for module-relative paths.zutf-8rr")rrrUrMrrWrrs) rrSrRr0rrHrdocr*rr+r+r, DocFileTestl s  rucOsHt}|jddr$t|jd|d<x|D]}|jt|f|q*W|S)aA unittest suite for one or more doctest files. The path to each doctest file is given as a string; the interpretation of that string depends on the keyword argument "module_relative". A number of options may be provided as keyword arguments: module_relative If "module_relative" is True, then the given file paths are interpreted as os-independent module-relative paths. By default, these paths are relative to the calling module's directory; but if the "package" argument is specified, then they are relative to that package. To ensure os-independence, "filename" should use "/" characters to separate path segments, and may not be an absolute path (i.e., it may not begin with "/"). If "module_relative" is False, then the given file paths are interpreted as os-specific paths. These paths may be absolute or relative (to the current working directory). package A Python package or the name of a Python package whose directory should be used as the base directory for module relative paths. If "package" is not specified, then the calling module's directory is used as the base directory for module relative filenames. It is an error to specify "package" if "module_relative" is False. setUp A set-up function. This is called before running the tests in each file. The setUp function will be passed a DocTest object. The setUp function can access the test globals as the globs attribute of the test passed. tearDown A tear-down function. This is called after running the tests in each file. The tearDown function will be passed a DocTest object. The tearDown function can access the test globals as the globs attribute of the test passed. globs A dictionary containing initial global variables for the tests. optionflags A set of doctest option flags expressed as an integer. parser A DocTestParser (or subclass) that should be used to extract tests from the files. encoding An encoding that will be used to convert the files to unicode. rSTrR)rmr.rCrqru)pathskwrrrr+r+r,r s 8  cCsg}xtj|D]x}t|trj|j|jdd |j}|r|jd|dd|jddd D7}q|dd|jddd D7}qWx|r|d dkr|jqWx|r|d dkr|jd qWdj |dS)awExtract script from text with examples. Converts text with examples to a Python script. Example input is converted to regular code. Example output and all other words are converted to comments: >>> text = ''' ... Here are examples of simple math. ... ... Python has super accurate integer addition ... ... >>> 2 + 2 ... 5 ... ... And very friendly error messages: ... ... >>> 1/0 ... To Infinity ... And ... Beyond ... ... You can use logic if you want: ... ... >>> if 0: ... ... blah ... ... blah ... ... ... ... Ho hum ... ''' >>> print(script_from_examples(text)) # Here are examples of simple math. # # Python has super accurate integer addition # 2 + 2 # Expected: ## 5 # # And very friendly error messages: # 1/0 # Expected: ## To Infinity ## And ## Beyond # # You can use logic if you want: # if 0: blah blah # # Ho hum Nr&z # Expected:cSsg|] }d|qS)z## r+)rrr+r+r,r sz(script_from_examples..rGcSsg|] }t|qSr+)r{)rrr+r+r,r srxr"rmrmrmrm) rrr8rrrrrropopr)rZrZpiecerrr+r+r,r s:  " csJt|}tj|}fdd|D}|s4td|d}t|j}|S)aExtract the test sources from a doctest docstring as a script. Provide the module (or dotted name of the module) containing the test to be debugged and the name (within the module) of the object with the doc string with tests to be debugged. csg|]}|jkr|qSr+)r*)rr')r*r+r,r* sztestsource..znot found in testsr")rCrrqrrr)rBr*rrtestsrcr+)r*r,r! s   cCst|}t|||dS)z4Debug a single doctest docstring, in argument `src`'N)r debug_script)srcpmr0ryr+r+r,r 1 sc Csddl}|r|j}ni}|rvyt|||Wqttjd|jdd}|j|jdtjdYqXn|jddj d|||dS)z7Debug a test script. `src` is the script, as a string.r"Nr&T)rr3zexec(%r)) rrrrr=rarr5Z interactionr?)r{r|r0rpr+r+r,rz6 s  rzcCs$t|}t||}t|||jdS)zDebug a single doctest docstring. Provide the module (or dotted name of the module) containing the test to be debugged and the name (within the module) of the object with the docstring with tests to be debugged. N)rCrrzr)rBr*r|ryr+r+r,r!J s c@s(eZdZdZddZddZddZdS) _TestClassz A pointless class, for sanity-checking of docstring testing. Methods: square() get() >>> _TestClass(13).get() + _TestClass(-12).get() 1 >>> hex(_TestClass(13).square().get()) '0xa9' cCs ||_dS)zval -> _TestClass object with associated value val. >>> t = _TestClass(123) >>> print(t.get()) 123 N)r)rfrr+r+r,rf sz_TestClass.__init__cCs|jd|_|S)zosquare() -> square TestClass's associated value >>> _TestClass(13).square().get() 169 r3)r)rfr+r+r,squarep s z_TestClass.squarecCs|jS)z~get() -> return TestClass's associated value. >>> x = _TestClass(-42) >>> print(x.get()) -42 )r)rfr+r+r,r.z sz_TestClass.getN)r5rkrlrrrr.r+r+r+r,r~X s   r~z Example of a string object, searched as-is. >>> x = 1; y = 2 >>> x + y, x * y (3, 2) a In 2.2, boolean expressions displayed 0 or 1. By default, we still accept them. This can be disabled by passing DONT_ACCEPT_TRUE_FOR_1 to the new optionflags argument. >>> 4 == 4 1 >>> 4 == 4 True >>> 4 > 4 0 >>> 4 > 4 False z Blank lines can be marked with : >>> print('foo\n\nbar\n') foo bar z If the ellipsis flag is used, then '...' can be used to elide substrings in the desired output: >>> print(list(range(1000))) #doctest: +ELLIPSIS [0, 1, 2, ..., 999] a If the whitespace normalization flag is used, then differences in whitespace are ignored. >>> print(list(range(30))) #doctest: +NORMALIZE_WHITESPACE [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] )r~rzbool-int equivalencez blank linesZellipsiszwhitespace normalizationc Cs tjdd}|jdddddd|jd d d tjgd d |jddddd|jdddd|j}|j}|j}d}x|jD]}|t|O}q|W|j r|t O}x||D]t}|j drt j j|\}}tj jd|t|dd}tj d=t|||d\} } nt|d||d\} } | rdSqWdS)Nzdoctest runner)Z descriptionz-vz --verbose store_trueFz'print very verbose output for all tests)actiondefaulthelpz-oz--optionrzqspecify a doctest option flag to apply to the test run; may be specified more than once to apply multiple options)rchoicesrrz-fz --fail-fastzystop running tests after first failure (this is a shorthand for -o FAIL_FAST, and is in addition to any other -o options))rrr]rz file containing the tests to run)nargsrr"z.pyrD)rr )rSrr r&)argparseArgumentParser add_argumentr'keys parse_argsr]rrZ fail_fastrrerMrror=insertr:rr) rrZ testfilesrrrrQdirnamerrr=r+r+r,_test s<       rr)r3)rV) NNNNTr"NFF)FrYNr")NNNN)FN)FN)F)SrZ __docformat____all__r-rrNr6rrMrrXr=r^r]ior# collectionsr$r%r'rrrrrrrrr r r r rr rKrnr2rCrUr\rcrdrwr{rrrrIrrrrrr ExceptionrrrrRrrrrZrr^r\rkZ TestSuitermrrsrurrrr rzr!r~rrr5exitr+r+r+r,.s      1%.DKl;;n f x $! @ IR   ,  +