/opt/alt/python37/lib64/python3.7/__pycache__
NameSizeModeActions
abc.cpython-37.opt-1.pyc64480644editdlrm
abc.cpython-37.opt-2.pyc32100644editdlrm
abc.cpython-37.pyc64480644editdlrm
aifc.cpython-37.opt-1.pyc261400644editdlrm
aifc.cpython-37.opt-2.pyc209350644editdlrm
aifc.cpython-37.pyc261400644editdlrm
antigravity.cpython-37.opt-1.pyc7980644editdlrm
antigravity.cpython-37.opt-2.pyc6540644editdlrm
antigravity.cpython-37.pyc7980644editdlrm
argparse.cpython-37.opt-1.pyc618470644editdlrm
argparse.cpython-37.opt-2.pyc526060644editdlrm
argparse.cpython-37.pyc619810644editdlrm
ast.cpython-37.opt-1.pyc117120644editdlrm
ast.cpython-37.opt-2.pyc59580644editdlrm
ast.cpython-37.pyc117120644editdlrm
asynchat.cpython-37.opt-1.pyc68310644editdlrm
asynchat.cpython-37.opt-2.pyc54550644editdlrm
asynchat.cpython-37.pyc68310644editdlrm
asyncore.cpython-37.opt-1.pyc158410644editdlrm
asyncore.cpython-37.opt-2.pyc146370644editdlrm
asyncore.cpython-37.pyc158410644editdlrm
base64.cpython-37.opt-1.pyc168240644editdlrm
base64.cpython-37.opt-2.pyc112260644editdlrm
base64.cpython-37.pyc169870644editdlrm
bdb.cpython-37.opt-1.pyc245730644editdlrm
bdb.cpython-37.opt-2.pyc155040644editdlrm
bdb.cpython-37.pyc245730644editdlrm
binhex.cpython-37.opt-1.pyc120560644editdlrm
binhex.cpython-37.opt-2.pyc115230644editdlrm
binhex.cpython-37.pyc120560644editdlrm
bisect.cpython-37.opt-1.pyc26950644editdlrm
bisect.cpython-37.opt-2.pyc13990644editdlrm
bisect.cpython-37.pyc26950644editdlrm
bz2.cpython-37.opt-1.pyc111780644editdlrm
bz2.cpython-37.opt-2.pyc61210644editdlrm
bz2.cpython-37.pyc111780644editdlrm
calendar.cpython-37.opt-1.pyc274210644editdlrm
calendar.cpython-37.opt-2.pyc226060644editdlrm
calendar.cpython-37.pyc274210644editdlrm
cgi.cpython-37.opt-1.pyc275060644editdlrm
cgi.cpython-37.opt-2.pyc189750644editdlrm
cgi.cpython-37.pyc275060644editdlrm
cgitb.cpython-37.opt-1.pyc101090644editdlrm
cgitb.cpython-37.opt-2.pyc85100644editdlrm
cgitb.cpython-37.pyc101090644editdlrm
chunk.cpython-37.opt-1.pyc49160644editdlrm
chunk.cpython-37.opt-2.pyc27700644editdlrm
chunk.cpython-37.pyc49160644editdlrm
cmd.cpython-37.opt-1.pyc125870644editdlrm
cmd.cpython-37.opt-2.pyc71480644editdlrm
cmd.cpython-37.pyc125870644editdlrm
code.cpython-37.opt-1.pyc98580644editdlrm
code.cpython-37.opt-2.pyc45790644editdlrm
code.cpython-37.pyc98580644editdlrm
codecs.cpython-37.opt-1.pyc341130644editdlrm
codecs.cpython-37.opt-2.pyc182650644editdlrm
codecs.cpython-37.pyc341130644editdlrm
codeop.cpython-37.opt-1.pyc64280644editdlrm
codeop.cpython-37.opt-2.pyc23590644editdlrm
codeop.cpython-37.pyc64280644editdlrm
colorsys.cpython-37.opt-1.pyc32940644editdlrm
colorsys.cpython-37.opt-2.pyc26880644editdlrm
colorsys.cpython-37.pyc32940644editdlrm
compileall.cpython-37.opt-1.pyc93310644editdlrm
compileall.cpython-37.opt-2.pyc69560644editdlrm
compileall.cpython-37.pyc93310644editdlrm
configparser.cpython-37.opt-1.pyc458770644editdlrm
configparser.cpython-37.opt-2.pyc309040644editdlrm
configparser.cpython-37.pyc458770644editdlrm
contextlib.cpython-37.opt-1.pyc204300644editdlrm
contextlib.cpython-37.opt-2.pyc146730644editdlrm
contextlib.cpython-37.pyc204560644editdlrm
contextvars.cpython-37.opt-1.pyc2540644editdlrm
contextvars.cpython-37.opt-2.pyc2540644editdlrm
contextvars.cpython-37.pyc2540644editdlrm
copy.cpython-37.opt-1.pyc71200644editdlrm
copy.cpython-37.opt-2.pyc48040644editdlrm
copy.cpython-37.pyc71200644editdlrm
copyreg.cpython-37.opt-1.pyc42060644editdlrm
copyreg.cpython-37.opt-2.pyc34020644editdlrm
copyreg.cpython-37.pyc42410644editdlrm
cProfile.cpython-37.opt-1.pyc48050644editdlrm
cProfile.cpython-37.opt-2.pyc43440644editdlrm
cProfile.cpython-37.pyc48050644editdlrm
crypt.cpython-37.opt-1.pyc31310644editdlrm
crypt.cpython-37.opt-2.pyc24670644editdlrm
crypt.cpython-37.pyc31310644editdlrm
csv.cpython-37.opt-1.pyc118290644editdlrm
csv.cpython-37.opt-2.pyc97900644editdlrm
csv.cpython-37.pyc118290644editdlrm
dataclasses.cpython-37.opt-1.pyc230210644editdlrm
dataclasses.cpython-37.opt-2.pyc195780644editdlrm
dataclasses.cpython-37.pyc230210644editdlrm
datetime.cpython-37.opt-1.pyc559320644editdlrm
datetime.cpython-37.opt-2.pyc468280644editdlrm
datetime.cpython-37.pyc572240644editdlrm
decimal.cpython-37.opt-1.pyc3700644editdlrm
decimal.cpython-37.opt-2.pyc3700644editdlrm
decimal.cpython-37.pyc3700644editdlrm
difflib.cpython-37.opt-1.pyc594030644editdlrm
difflib.cpython-37.opt-2.pyc248270644editdlrm
difflib.cpython-37.pyc594410644editdlrm
dis.cpython-37.opt-1.pyc152020644editdlrm
dis.cpython-37.opt-2.pyc113950644editdlrm
dis.cpython-37.pyc152020644editdlrm
doctest.cpython-37.opt-1.pyc753300644editdlrm
doctest.cpython-37.opt-2.pyc400030644editdlrm
doctest.cpython-37.pyc755750644editdlrm
dummy_threading.cpython-37.opt-1.pyc11210644editdlrm
dummy_threading.cpython-37.opt-2.pyc7480644editdlrm
dummy_threading.cpython-37.pyc11210644editdlrm
enum.cpython-37.opt-1.pyc243760644editdlrm
enum.cpython-37.opt-2.pyc200850644editdlrm
enum.cpython-37.pyc243760644editdlrm
filecmp.cpython-37.opt-1.pyc83040644editdlrm
filecmp.cpython-37.opt-2.pyc58870644editdlrm
filecmp.cpython-37.pyc83040644editdlrm
fileinput.cpython-37.opt-1.pyc132520644editdlrm
fileinput.cpython-37.opt-2.pyc76560644editdlrm
fileinput.cpython-37.pyc132520644editdlrm
fnmatch.cpython-37.opt-1.pyc33340644editdlrm
fnmatch.cpython-37.opt-2.pyc21450644editdlrm
fnmatch.cpython-37.pyc33340644editdlrm
formatter.cpython-37.opt-1.pyc175500644editdlrm
formatter.cpython-37.opt-2.pyc151100644editdlrm
formatter.cpython-37.pyc175500644editdlrm
fractions.cpython-37.opt-1.pyc184260644editdlrm
fractions.cpython-37.opt-2.pyc111400644editdlrm
fractions.cpython-37.pyc184260644editdlrm
ftplib.cpython-37.opt-1.pyc282220644editdlrm
ftplib.cpython-37.opt-2.pyc184180644editdlrm
ftplib.cpython-37.pyc282220644editdlrm
functools.cpython-37.opt-1.pyc241290644editdlrm
functools.cpython-37.opt-2.pyc182030644editdlrm
functools.cpython-37.pyc242280644editdlrm
genericpath.cpython-37.opt-1.pyc39010644editdlrm
genericpath.cpython-37.opt-2.pyc27520644editdlrm
genericpath.cpython-37.pyc39010644editdlrm
getopt.cpython-37.opt-1.pyc62020644editdlrm
getopt.cpython-37.opt-2.pyc36480644editdlrm
getopt.cpython-37.pyc62360644editdlrm
getpass.cpython-37.opt-1.pyc41610644editdlrm
getpass.cpython-37.opt-2.pyc29760644editdlrm
getpass.cpython-37.pyc41610644editdlrm
gettext.cpython-37.opt-1.pyc141650644editdlrm
gettext.cpython-37.opt-2.pyc134740644editdlrm
gettext.cpython-37.pyc141650644editdlrm
glob.cpython-37.opt-1.pyc41910644editdlrm
glob.cpython-37.opt-2.pyc33310644editdlrm
glob.cpython-37.pyc42560644editdlrm
gzip.cpython-37.opt-1.pyc173520644editdlrm
gzip.cpython-37.opt-2.pyc135460644editdlrm
gzip.cpython-37.pyc173520644editdlrm
hashlib.cpython-37.opt-1.pyc65880644editdlrm
hashlib.cpython-37.opt-2.pyc60160644editdlrm
hashlib.cpython-37.pyc65880644editdlrm
heapq.cpython-37.opt-1.pyc143590644editdlrm
heapq.cpython-37.opt-2.pyc113690644editdlrm
heapq.cpython-37.pyc143590644editdlrm
hmac.cpython-37.opt-1.pyc61100644editdlrm
hmac.cpython-37.opt-2.pyc39200644editdlrm
hmac.cpython-37.pyc61100644editdlrm
imaplib.cpython-37.opt-1.pyc392160644editdlrm
imaplib.cpython-37.opt-2.pyc271280644editdlrm
imaplib.cpython-37.pyc414270644editdlrm
imghdr.cpython-37.opt-1.pyc41390644editdlrm
imghdr.cpython-37.opt-2.pyc38240644editdlrm
imghdr.cpython-37.pyc41390644editdlrm
imp.cpython-37.opt-1.pyc97500644editdlrm
imp.cpython-37.opt-2.pyc73470644editdlrm
imp.cpython-37.pyc97500644editdlrm
inspect.cpython-37.opt-1.pyc797610644editdlrm
inspect.cpython-37.opt-2.pyc542660644editdlrm
inspect.cpython-37.pyc800400644editdlrm
io.cpython-37.opt-1.pyc34060644editdlrm
io.cpython-37.opt-2.pyc19150644editdlrm
io.cpython-37.pyc34060644editdlrm
ipaddress.cpython-37.opt-1.pyc628140644editdlrm
ipaddress.cpython-37.opt-2.pyc369460644editdlrm
ipaddress.cpython-37.pyc628140644editdlrm
keyword.cpython-37.opt-1.pyc18060644editdlrm
keyword.cpython-37.opt-2.pyc15380644editdlrm
keyword.cpython-37.pyc18060644editdlrm
linecache.cpython-37.opt-1.pyc38140644editdlrm
linecache.cpython-37.opt-2.pyc27090644editdlrm
linecache.cpython-37.pyc38140644editdlrm
locale.cpython-37.opt-1.pyc345850644editdlrm
locale.cpython-37.opt-2.pyc299580644editdlrm
locale.cpython-37.pyc345850644editdlrm
lzma.cpython-37.opt-1.pyc119360644editdlrm
lzma.cpython-37.opt-2.pyc57450644editdlrm
lzma.cpython-37.pyc119360644editdlrm
macpath.cpython-37.opt-1.pyc58040644editdlrm
macpath.cpython-37.opt-2.pyc45380644editdlrm
macpath.cpython-37.pyc58040644editdlrm
mailbox.cpython-37.opt-1.pyc635630644editdlrm
mailbox.cpython-37.opt-2.pyc544160644editdlrm
mailbox.cpython-37.pyc636450644editdlrm
mailcap.cpython-37.opt-1.pyc72090644editdlrm
mailcap.cpython-37.opt-2.pyc56390644editdlrm
mailcap.cpython-37.pyc72090644editdlrm
mimetypes.cpython-37.opt-1.pyc157240644editdlrm
mimetypes.cpython-37.opt-2.pyc97260644editdlrm
mimetypes.cpython-37.pyc157240644editdlrm
modulefinder.cpython-37.opt-1.pyc152870644editdlrm
modulefinder.cpython-37.opt-2.pyc144460644editdlrm
modulefinder.cpython-37.pyc153490644editdlrm
netrc.cpython-37.opt-1.pyc37600644editdlrm
netrc.cpython-37.opt-2.pyc35220644editdlrm
netrc.cpython-37.pyc37600644editdlrm
nntplib.cpython-37.opt-1.pyc337470644editdlrm
nntplib.cpython-37.opt-2.pyc212060644editdlrm
nntplib.cpython-37.pyc337470644editdlrm
ntpath.cpython-37.opt-1.pyc130010644editdlrm
ntpath.cpython-37.opt-2.pyc109520644editdlrm
ntpath.cpython-37.pyc130010644editdlrm
nturl2path.cpython-37.opt-1.pyc16120644editdlrm
nturl2path.cpython-37.opt-2.pyc11930644editdlrm
nturl2path.cpython-37.pyc16120644editdlrm
numbers.cpython-37.opt-1.pyc121890644editdlrm
numbers.cpython-37.opt-2.pyc82270644editdlrm
numbers.cpython-37.pyc121890644editdlrm
opcode.cpython-37.opt-1.pyc53750644editdlrm
opcode.cpython-37.opt-2.pyc52350644editdlrm
opcode.cpython-37.pyc53750644editdlrm
operator.cpython-37.opt-1.pyc138970644editdlrm
operator.cpython-37.opt-2.pyc114380644editdlrm
operator.cpython-37.pyc138970644editdlrm
optparse.cpython-37.opt-1.pyc478220644editdlrm
optparse.cpython-37.opt-2.pyc354670644editdlrm
optparse.cpython-37.pyc478900644editdlrm
os.cpython-37.opt-1.pyc297630644editdlrm
os.cpython-37.opt-2.pyc178830644editdlrm
os.cpython-37.pyc297950644editdlrm
pathlib.cpython-37.opt-1.pyc422560644editdlrm
pathlib.cpython-37.opt-2.pyc343560644editdlrm
pathlib.cpython-37.pyc422560644editdlrm
pdb.cpython-37.opt-1.pyc468320644editdlrm
pdb.cpython-37.opt-2.pyc327650644editdlrm
pdb.cpython-37.pyc468870644editdlrm
pickle.cpython-37.opt-1.pyc429210644editdlrm
pickle.cpython-37.opt-2.pyc381330644editdlrm
pickle.cpython-37.pyc430380644editdlrm
pickletools.cpython-37.opt-1.pyc645080644editdlrm
pickletools.cpython-37.opt-2.pyc558990644editdlrm
pickletools.cpython-37.pyc653280644editdlrm
pipes.cpython-37.opt-1.pyc78000644editdlrm
pipes.cpython-37.opt-2.pyc49270644editdlrm
pipes.cpython-37.pyc78000644editdlrm
pkgutil.cpython-37.opt-1.pyc163570644editdlrm
pkgutil.cpython-37.opt-2.pyc110970644editdlrm
pkgutil.cpython-37.pyc163570644editdlrm
platform.cpython-37.opt-1.pyc281800644editdlrm
platform.cpython-37.opt-2.pyc189460644editdlrm
platform.cpython-37.pyc281800644editdlrm
plistlib.cpython-37.opt-1.pyc254790644editdlrm
plistlib.cpython-37.opt-2.pyc224300644editdlrm
plistlib.cpython-37.pyc255460644editdlrm
poplib.cpython-37.opt-1.pyc133330644editdlrm
poplib.cpython-37.opt-2.pyc84020644editdlrm
poplib.cpython-37.pyc133330644editdlrm
posixpath.cpython-37.opt-1.pyc104260644editdlrm
posixpath.cpython-37.opt-2.pyc87050644editdlrm
posixpath.cpython-37.pyc104260644editdlrm
pprint.cpython-37.opt-1.pyc157790644editdlrm
pprint.cpython-37.opt-2.pyc137150644editdlrm
pprint.cpython-37.pyc158300644editdlrm
profile.cpython-37.opt-1.pyc139030644editdlrm
profile.cpython-37.opt-2.pyc109210644editdlrm
profile.cpython-37.pyc140890644editdlrm
pstats.cpython-37.opt-1.pyc222910644editdlrm
pstats.cpython-37.opt-2.pyc197680644editdlrm
pstats.cpython-37.pyc222910644editdlrm
pty.cpython-37.opt-1.pyc38800644editdlrm
pty.cpython-37.opt-2.pyc30270644editdlrm
pty.cpython-37.pyc38800644editdlrm
pyclbr.cpython-37.opt-1.pyc103700644editdlrm
pyclbr.cpython-37.opt-2.pyc67620644editdlrm
pyclbr.cpython-37.pyc103700644editdlrm
pydoc.cpython-37.opt-1.pyc836130644editdlrm
pydoc.cpython-37.opt-2.pyc739140644editdlrm
pydoc.cpython-37.pyc836660644editdlrm
py_compile.cpython-37.opt-1.pyc71880644editdlrm
py_compile.cpython-37.opt-2.pyc35540644editdlrm
py_compile.cpython-37.pyc71880644editdlrm
queue.cpython-37.opt-1.pyc114690644editdlrm
queue.cpython-37.opt-2.pyc63810644editdlrm
queue.cpython-37.pyc114690644editdlrm
quopri.cpython-37.opt-1.pyc55930644editdlrm
quopri.cpython-37.opt-2.pyc45570644editdlrm
quopri.cpython-37.pyc57680644editdlrm
random.cpython-37.opt-1.pyc194050644editdlrm
random.cpython-37.opt-2.pyc128640644editdlrm
random.cpython-37.pyc194050644editdlrm
re.cpython-37.opt-1.pyc139150644editdlrm
re.cpython-37.opt-2.pyc55550644editdlrm
re.cpython-37.pyc139150644editdlrm
reprlib.cpython-37.opt-1.pyc53470644editdlrm
reprlib.cpython-37.opt-2.pyc51910644editdlrm
reprlib.cpython-37.pyc53470644editdlrm
rlcompleter.cpython-37.opt-1.pyc57440644editdlrm
rlcompleter.cpython-37.opt-2.pyc30810644editdlrm
rlcompleter.cpython-37.pyc57440644editdlrm
runpy.cpython-37.opt-1.pyc79420644editdlrm
runpy.cpython-37.opt-2.pyc63990644editdlrm
runpy.cpython-37.pyc79420644editdlrm
sched.cpython-37.opt-1.pyc65180644editdlrm
sched.cpython-37.opt-2.pyc34780644editdlrm
sched.cpython-37.pyc65180644editdlrm
secrets.cpython-37.opt-1.pyc21810644editdlrm
secrets.cpython-37.opt-2.pyc11230644editdlrm
secrets.cpython-37.pyc21810644editdlrm
selectors.cpython-37.opt-1.pyc169450644editdlrm
selectors.cpython-37.opt-2.pyc128940644editdlrm
selectors.cpython-37.pyc169450644editdlrm
shelve.cpython-37.opt-1.pyc95030644editdlrm
shelve.cpython-37.opt-2.pyc53500644editdlrm
shelve.cpython-37.pyc95030644editdlrm
shlex.cpython-37.opt-1.pyc71820644editdlrm
shlex.cpython-37.opt-2.pyc66240644editdlrm
shlex.cpython-37.pyc71820644editdlrm
shutil.cpython-37.opt-1.pyc309770644editdlrm
shutil.cpython-37.opt-2.pyc202040644editdlrm
shutil.cpython-37.pyc309770644editdlrm
signal.cpython-37.opt-1.pyc25090644editdlrm
signal.cpython-37.opt-2.pyc22810644editdlrm
signal.cpython-37.pyc25090644editdlrm
site.cpython-37.opt-1.pyc166400644editdlrm
site.cpython-37.opt-2.pyc110900644editdlrm
site.cpython-37.pyc166400644editdlrm
smtpd.cpython-37.opt-1.pyc266010644editdlrm
smtpd.cpython-37.opt-2.pyc239820644editdlrm
smtpd.cpython-37.pyc266010644editdlrm
smtplib.cpython-37.opt-1.pyc354250644editdlrm
smtplib.cpython-37.opt-2.pyc190130644editdlrm
smtplib.cpython-37.pyc354860644editdlrm
sndhdr.cpython-37.opt-1.pyc69000644editdlrm
sndhdr.cpython-37.opt-2.pyc56250644editdlrm
sndhdr.cpython-37.pyc69000644editdlrm
socket.cpython-37.opt-1.pyc219940644editdlrm
socket.cpython-37.opt-2.pyc145600644editdlrm
socket.cpython-37.pyc220340644editdlrm
socketserver.cpython-37.opt-1.pyc241970644editdlrm
socketserver.cpython-37.opt-2.pyc132700644editdlrm
socketserver.cpython-37.pyc241970644editdlrm
sre_compile.cpython-37.opt-1.pyc149740644editdlrm
sre_compile.cpython-37.opt-2.pyc145600644editdlrm
sre_compile.cpython-37.pyc152000644editdlrm
sre_constants.cpython-37.opt-1.pyc62880644editdlrm
sre_constants.cpython-37.opt-2.pyc58630644editdlrm
sre_constants.cpython-37.pyc62880644editdlrm
sre_parse.cpython-37.opt-1.pyc212360644editdlrm
sre_parse.cpython-37.opt-2.pyc211880644editdlrm
sre_parse.cpython-37.pyc212830644editdlrm
ssl.cpython-37.opt-1.pyc393870644editdlrm
ssl.cpython-37.opt-2.pyc298810644editdlrm
ssl.cpython-37.pyc393870644editdlrm
stat.cpython-37.opt-1.pyc43410644editdlrm
stat.cpython-37.opt-2.pyc35440644editdlrm
stat.cpython-37.pyc43410644editdlrm
statistics.cpython-37.opt-1.pyc179260644editdlrm
statistics.cpython-37.opt-2.pyc72390644editdlrm
statistics.cpython-37.pyc181610644editdlrm
string.cpython-37.opt-1.pyc78320644editdlrm
string.cpython-37.opt-2.pyc67260644editdlrm
string.cpython-37.pyc78320644editdlrm
stringprep.cpython-37.opt-1.pyc99710644editdlrm
stringprep.cpython-37.opt-2.pyc97510644editdlrm
stringprep.cpython-37.pyc100290644editdlrm
struct.cpython-37.opt-1.pyc3310644editdlrm
struct.cpython-37.opt-2.pyc3310644editdlrm
struct.cpython-37.pyc3310644editdlrm
subprocess.cpython-37.opt-1.pyc393460644editdlrm
subprocess.cpython-37.opt-2.pyc276370644editdlrm
subprocess.cpython-37.pyc394510644editdlrm
sunau.cpython-37.opt-1.pyc172080644editdlrm
sunau.cpython-37.opt-2.pyc126180644editdlrm
sunau.cpython-37.pyc172080644editdlrm
symbol.cpython-37.opt-1.pyc25620644editdlrm
symbol.cpython-37.opt-2.pyc24860644editdlrm
symbol.cpython-37.pyc25620644editdlrm
symtable.cpython-37.opt-1.pyc103590644editdlrm
symtable.cpython-37.opt-2.pyc96620644editdlrm
symtable.cpython-37.pyc104510644editdlrm
sysconfig.cpython-37.opt-1.pyc155370644editdlrm
sysconfig.cpython-37.opt-2.pyc131480644editdlrm
sysconfig.cpython-37.pyc155370644editdlrm
tabnanny.cpython-37.opt-1.pyc69750644editdlrm
tabnanny.cpython-37.opt-2.pyc60420644editdlrm
tabnanny.cpython-37.pyc69750644editdlrm
tarfile.cpython-37.opt-1.pyc618970644editdlrm
tarfile.cpython-37.opt-2.pyc481930644editdlrm
tarfile.cpython-37.pyc618970644editdlrm
telnetlib.cpython-37.opt-1.pyc180990644editdlrm
telnetlib.cpython-37.opt-2.pyc105900644editdlrm
telnetlib.cpython-37.pyc180990644editdlrm
tempfile.cpython-37.opt-1.pyc222250644editdlrm
tempfile.cpython-37.opt-2.pyc157530644editdlrm
tempfile.cpython-37.pyc222250644editdlrm
textwrap.cpython-37.opt-1.pyc134500644editdlrm
textwrap.cpython-37.opt-2.pyc62400644editdlrm
textwrap.cpython-37.pyc135220644editdlrm
this.cpython-37.opt-1.pyc12740644editdlrm
this.cpython-37.opt-2.pyc12740644editdlrm
this.cpython-37.pyc12740644editdlrm
threading.cpython-37.opt-1.pyc372810644editdlrm
threading.cpython-37.opt-2.pyc209790644editdlrm
threading.cpython-37.pyc379300644editdlrm
timeit.cpython-37.opt-1.pyc116820644editdlrm
timeit.cpython-37.opt-2.pyc58220644editdlrm
timeit.cpython-37.pyc116820644editdlrm
token.cpython-37.opt-1.pyc35960644editdlrm
token.cpython-37.opt-2.pyc35460644editdlrm
token.cpython-37.pyc35960644editdlrm
tokenize.cpython-37.opt-1.pyc177840644editdlrm
tokenize.cpython-37.opt-2.pyc141840644editdlrm
tokenize.cpython-37.pyc178280644editdlrm
trace.cpython-37.opt-1.pyc193170644editdlrm
trace.cpython-37.opt-2.pyc163140644editdlrm
trace.cpython-37.pyc193170644editdlrm
traceback.cpython-37.opt-1.pyc196190644editdlrm
traceback.cpython-37.opt-2.pyc107190644editdlrm
traceback.cpython-37.pyc196190644editdlrm
tracemalloc.cpython-37.opt-1.pyc172730644editdlrm
tracemalloc.cpython-37.opt-2.pyc158570644editdlrm
tracemalloc.cpython-37.pyc172730644editdlrm
tty.cpython-37.opt-1.pyc10910644editdlrm
tty.cpython-37.opt-2.pyc9900644editdlrm
tty.cpython-37.pyc10910644editdlrm
types.cpython-37.opt-1.pyc89730644editdlrm
types.cpython-37.opt-2.pyc77510644editdlrm
types.cpython-37.pyc89730644editdlrm
typing.cpython-37.opt-1.pyc509770644editdlrm
typing.cpython-37.opt-2.pyc389790644editdlrm
typing.cpython-37.pyc510260644editdlrm
uu.cpython-37.opt-1.pyc37950644editdlrm
uu.cpython-37.opt-2.pyc35510644editdlrm
uu.cpython-37.pyc37950644editdlrm
uuid.cpython-37.opt-1.pyc230660644editdlrm
uuid.cpython-37.opt-2.pyc159100644editdlrm
uuid.cpython-37.pyc232000644editdlrm
warnings.cpython-37.opt-1.pyc133010644editdlrm
warnings.cpython-37.opt-2.pyc109210644editdlrm
warnings.cpython-37.pyc138330644editdlrm
wave.cpython-37.opt-1.pyc182360644editdlrm
wave.cpython-37.opt-2.pyc122440644editdlrm
wave.cpython-37.pyc182860644editdlrm
weakref.cpython-37.opt-1.pyc195360644editdlrm
weakref.cpython-37.opt-2.pyc162360644editdlrm
weakref.cpython-37.pyc195660644editdlrm
webbrowser.cpython-37.opt-1.pyc169130644editdlrm
webbrowser.cpython-37.opt-2.pyc145280644editdlrm
webbrowser.cpython-37.pyc169460644editdlrm
xdrlib.cpython-37.opt-1.pyc83210644editdlrm
xdrlib.cpython-37.opt-2.pyc78360644editdlrm
xdrlib.cpython-37.pyc83210644editdlrm
zipapp.cpython-37.opt-1.pyc58000644editdlrm
zipapp.cpython-37.opt-2.pyc46240644editdlrm
zipapp.cpython-37.pyc58000644editdlrm
zipfile.cpython-37.opt-1.pyc502920644editdlrm
zipfile.cpython-37.opt-2.pyc440040644editdlrm
zipfile.cpython-37.pyc503290644editdlrm
_bootlocale.cpython-37.opt-1.pyc12200644editdlrm
_bootlocale.cpython-37.opt-2.pyc9950644editdlrm
_bootlocale.cpython-37.pyc12460644editdlrm
_collections_abc.cpython-37.opt-1.pyc289390644editdlrm
_collections_abc.cpython-37.opt-2.pyc237850644editdlrm
_collections_abc.cpython-37.pyc289390644editdlrm
_compat_pickle.cpython-37.opt-1.pyc57470644editdlrm
_compat_pickle.cpython-37.opt-2.pyc57470644editdlrm
_compat_pickle.cpython-37.pyc58050644editdlrm
_compression.cpython-37.opt-1.pyc41210644editdlrm
_compression.cpython-37.opt-2.pyc39050644editdlrm
_compression.cpython-37.pyc41210644editdlrm
_dummy_thread.cpython-37.opt-1.pyc59860644editdlrm
_dummy_thread.cpython-37.opt-2.pyc33380644editdlrm
_dummy_thread.cpython-37.pyc59860644editdlrm
_markupbase.cpython-37.opt-1.pyc76130644editdlrm
_markupbase.cpython-37.opt-2.pyc72330644editdlrm
_markupbase.cpython-37.pyc77820644editdlrm
_osx_support.cpython-37.opt-1.pyc102950644editdlrm
_osx_support.cpython-37.opt-2.pyc78460644editdlrm
_osx_support.cpython-37.pyc102950644editdlrm
_pydecimal.cpython-37.opt-1.pyc1622010644editdlrm
_pydecimal.cpython-37.opt-2.pyc810560644editdlrm
_pydecimal.cpython-37.pyc1622010644editdlrm
_pyio.cpython-37.opt-1.pyc729240644editdlrm
_pyio.cpython-37.opt-2.pyc504150644editdlrm
_pyio.cpython-37.pyc729440644editdlrm
_py_abc.cpython-37.opt-1.pyc46130644editdlrm
_py_abc.cpython-37.opt-2.pyc33940644editdlrm
_py_abc.cpython-37.pyc46510644editdlrm
_sitebuiltins.cpython-37.opt-1.pyc34620644editdlrm
_sitebuiltins.cpython-37.opt-2.pyc29380644editdlrm
_sitebuiltins.cpython-37.pyc34620644editdlrm
_strptime.cpython-37.opt-1.pyc161010644editdlrm
_strptime.cpython-37.opt-2.pyc123710644editdlrm
_strptime.cpython-37.pyc161010644editdlrm
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-37.opt-1.pyc234930644editdlrm
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-37.opt-2.pyc234930644editdlrm
_sysconfigdata_dm_linux_x86_64-linux-gnu.cpython-37.pyc234930644editdlrm
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-37.opt-1.pyc228720644editdlrm
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-37.opt-2.pyc228720644editdlrm
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-37.pyc228720644editdlrm
_threading_local.cpython-37.opt-1.pyc64090644editdlrm
_threading_local.cpython-37.opt-2.pyc30940644editdlrm
_threading_local.cpython-37.pyc64090644editdlrm
_weakrefset.cpython-37.opt-1.pyc74590644editdlrm
_weakrefset.cpython-37.opt-2.pyc74590644editdlrm
_weakrefset.cpython-37.pyc74590644editdlrm
__future__.cpython-37.opt-1.pyc41290644editdlrm
__future__.cpython-37.opt-2.pyc21530644editdlrm
__future__.cpython-37.pyc41290644editdlrm
__phello__.foo.cpython-37.opt-1.pyc1380644editdlrm
__phello__.foo.cpython-37.opt-2.pyc1380644editdlrm
__phello__.foo.cpython-37.pyc1380644editdlrm
Edit: /opt/alt/python37/lib64/python3.7/__pycache__/doctest.cpython-37.pyc (75575B)
B  fp˜ã!@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 mZd#d&lmZed'd(ƒZiZd)d„ZedƒZedƒZedƒZedƒZedƒZedƒZeeBeBeBeBeBZed ƒZed ƒZed ƒZed ƒZedƒZeeBeBeBeBZ d*Z!d+Z"d,d-„Z#dsd/d0„Z$d1d2„Z%d3d4„Z&dtd6d7„Z'd8d9„Z(Gd:d;„d;eƒZ)dd?„Z+d@dA„Z,GdBdC„dCej-ƒZ.dDdE„Z/GdFd„dƒZ0GdGd„dƒZ1GdHd„dƒZ2GdId„dƒZ3GdJd„dƒZ4GdKd„dƒZ5GdLd„de6ƒZ7GdMd„de6ƒZ8GdNd„de4ƒZ9d$a:dudQd„Z;dOd$d$d$d$dOd#d$dPe2ƒd$f dRd„ZdUd„Z?GdVdW„dWe j@ƒZAGdXdY„dYeAƒZBGdZd[„d[e jCƒZDdwd\d„ZEGd]d^„d^eAƒZFdOd$d$e2ƒd$fd_d`„ZGdad„ZHdbd„ZIdcd „ZJdxddd!„ZKdydedf„ZLdzdgd"„ZMGdhdi„diƒZNeNdjdkdldmdndoœZOdpdq„ZPeQdrkrpe  RePƒ¡d$S){aÅModule 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 enÚregister_optionflagÚDONT_ACCEPT_TRUE_FOR_1ÚDONT_ACCEPT_BLANKLINEÚNORMALIZE_WHITESPACEÚELLIPSISÚSKIPÚIGNORE_EXCEPTION_DETAILÚCOMPARISON_FLAGSÚ REPORT_UDIFFÚ REPORT_CDIFFÚ REPORT_NDIFFÚREPORT_ONLY_FIRST_FAILUREÚREPORTING_FLAGSÚ FAIL_FASTÚExampleÚDocTestÚ DocTestParserÚ DocTestFinderÚ DocTestRunnerÚ OutputCheckerÚDocTestFailureÚUnexpectedExceptionÚ DebugRunnerÚtestmodÚtestfileÚrun_docstring_examplesÚ DocTestSuiteÚ DocFileSuiteÚset_unittest_reportflagsÚscript_from_examplesÚ testsourceÚ debug_srcÚdebugéN)ÚStringIO)Ú namedtupleÚ TestResultszfailed attemptedcCst |dttƒ>¡S)Né)ÚOPTIONFLAGS_BY_NAMEÚ setdefaultÚlen)Úname©r+ú,/opt/alt/python37/lib64/python3.7/doctest.pyr„sz z...cCs<d}x2tjD](}| |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_namesÚgetÚgetattrZ compiler_flag)ÚglobsÚflagsZfnameZfeaturer+r+r,Ú_extract_future_flags·s   r2écCsVt |¡r|St|tƒr,t|tƒtƒdgƒS|dkrJtjt  |¡j dSt dƒ‚dS)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) ÚinspectÚismoduleÚ isinstanceÚstrÚ __import__ÚglobalsÚlocalsÚsysÚmodulesÚ _getframeÚ f_globalsÚ TypeError)ÚmoduleZdepthr+r+r,Ú_normalize_moduleÃs  rCcCsxdD]}| |d¡}qW|S)N)z ú Ú )Úreplace)ÚdataÚnewliner+r+r,Ú_newline_convertÖs rIc Csz|rVt|dƒ}t||ƒ}t|ddƒdk rVt|jdƒrV|j |¡}| |¡}t|ƒ|fSt||d}|  ¡|fSQRXdS)NéÚ __loader__Úget_data)Úencoding) rCÚ_module_relative_pathr/ÚhasattrrKrLÚdecoderIÚopenÚread)ÚfilenameÚpackageÚmodule_relativerMZ file_contentsÚfr+r+r,Ú_load_testfileÝs      rWécCst d|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)^(?!$)ú )ÚreÚsub)ÚsÚindentr+r+r,Ú_indentësr^cCs*tƒ}|\}}}tj||||d| ¡S)zz Return a string containing a traceback message for the given exc_info tuple (as returned by sys.exc_info()). )Úfile)r#Ú tracebackÚprint_exceptionÚgetvalue)Úexc_infoZexcoutÚexc_typeZexc_valZexc_tbr+r+r,Ú_exception_tracebackós rec@seZdZdd„Zddd„ZdS)Ú _SpoofOutcCs$t |¡}|r | d¡s |d7}|S)NrE)r#rbÚendswith)ÚselfÚresultr+r+r,rbs z_SpoofOut.getvalueNcCs| |¡t |¡dS)N)Úseekr#Útruncate)rhÚsizer+r+r,rk s z_SpoofOut.truncate)N)r5Ú __module__Ú __qualname__rbrkr+r+r+r,rfÿs rfcCsÔt|kr||kS| t¡}t|ƒdks*t‚dt|ƒ}}|d}|rb| |¡r^t|ƒ}|d=ndS|d}|r| |¡rŒ|t|ƒ8}|d=ndS||krœdSx2|D]*}| |||¡}|dkrÀdS|t|ƒ7}q¢WdS)z_ Essentially the only subtle case: >>> _ellipsis_match('aa...aa', 'aaa') False r3r"FéÿÿÿÿT)ÚELLIPSIS_MARKERÚsplitr)ÚAssertionErrorÚ startswithrgÚfind)ÚwantÚgotZwsÚstartposÚendposÚwr+r+r,Ú_ellipsis_matchs2     rzcCs| ¡}|rd|SdSdS)z)Return a commented form of the given linez# ú#N)Úrstrip)Úliner+r+r,Ú _comment_line?sr~cCshdt|ƒ}}| d¡}|dkr$|}| dd|¡}|dkr>|}| dd|¡}|dkr\|d}|||…S)Nr"rEú:Ú.r&)r)rtÚrfind)ÚmsgÚstartÚendÚir+r+r,Ú_strip_exception_detailsGs  r†c@s2eZdZdZdd„Zd dd„Zdd„Zd 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)ÚstdoutÚnosigintr&)Ú_OutputRedirectingPdb__outÚ$_OutputRedirectingPdb__debugger_usedÚpdbÚPdbÚ__init__Z use_rawinput)rhÚoutr+r+r,rŽgsz_OutputRedirectingPdb.__init__NcCs*d|_|dkrt ¡j}tj ||¡dS)NT)r‹r=r?Úf_backrŒrÚ set_trace)rhÚframer+r+r,r‘os z_OutputRedirectingPdb.set_tracecCs|jrtj |¡dS)N)r‹rŒrÚ set_continue)rhr+r+r,r“usz"_OutputRedirectingPdb.set_continuecGs.tj}|jt_ztjj|f|žŽS|t_XdS)N)r=rˆrŠrŒrÚtrace_dispatch)rhÚargsÚ save_stdoutr+r+r,r”{s z$_OutputRedirectingPdb.trace_dispatch)N)r5rmrnÚ__doc__rŽr‘r“r”r+r+r+r,r‡as  r‡cCsòt |¡std|ƒ‚| d¡r(tdƒ‚tjj| d¡Ž}t |dƒrXtj |j ¡d}nŒ|j dkržt t jƒdkr–t jddkr–tj t jd¡d}qätj}nFt |dƒrÖx,|jD]"}tj ||¡}tj |¡r°|Sq°Wtd |j ƒ‚tj ||¡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__))r6r7rArsÚ ValueErrorÚosÚpathÚjoinrqrOr™r5r)r=ÚargvÚcurdirrœÚexists)rBZ test_pathZbasedirZ directoryZfullpathr+r+r,rN†s&         rNc@s*eZdZdZd dd„Zdd„Zdd „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"cCsv| d¡s|d7}|r(| d¡s(|d7}|dk rB| d¡sB|d7}||_||_||_||_|dkrfi}||_||_dS)NrE)rgÚsourceruÚlinenor]ÚoptionsÚexc_msg)rhr¤rur§r¥r]r¦r+r+r,rŽ×s zExample.__init__cCs\t|ƒt|ƒk rtS|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkS)N)ÚtypeÚNotImplementedr¤rur¥r]r¦r§)rhÚotherr+r+r,Ú__eq__és     zExample.__eq__cCst|j|j|j|j|jfƒS)N)Úhashr¤rur¥r]r§)rhr+r+r,Ú__hash__ôszExample.__hash__)Nr"r"N)r5rmrnr—rŽr«r­r+r+r+r,r´s "  c@s8eZdZdZdd„Zdd„Zdd„Zdd „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>t|tƒrtdƒ‚||_||_| ¡|_||_||_||_ dS)zŒ Create a new DocTest containing the given examples. The DocTest's globals are initialized with a copy of `globs`. z8DocTest no longer accepts str; use DocTestParser insteadN) r8r9rrÚexamplesÚ docstringÚcopyr0r*rSr¥)rhr®r0r*rSr¥r¯r+r+r,rŽs  zDocTest.__init__cCsRt|jƒdkrd}n"t|jƒdkr(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*rSr¥)rhr®r+r+r,Ú__repr__szDocTest.__repr__cCs\t|ƒt|ƒk rtS|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkS)N)r¨r©r®r¯r0r*rSr¥)rhrªr+r+r,r«)s     zDocTest.__eq__cCst|j|j|j|jfƒS)N)r¬r¯r*rSr¥)rhr+r+r,r­4szDocTest.__hash__cCs:t|tƒstS|j|j|jt|ƒf|j|j|jt|ƒfkS)N)r8rr©r*rSr¥Úid)rhrªr+r+r,Ú__lt__8s zDocTest.__lt__N) r5rmrnr—rŽr²r«r­r´r+r+r+r,røs   c@sªeZdZdZe dejejB¡Ze dejejBej B¡Z e d¡j Z ddd„Z dd „Zdd d „Zd d „Ze dej¡Zdd„Ze dej¡Zdd„Zdd„Zdd„ZdS)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| ¡}| |¡‰ˆdkr8d ‡fdd„| d¡Dƒ¡}g}d\}}xª|j |¡D]š}| ||| ¡…¡|| d|| ¡¡7}|  |||¡\}}} } |  |¡sÊ| t || | |ˆt |  d¡ƒ|d¡|| d| ¡| ¡¡7}| ¡}qRW| ||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"rEcsg|]}|ˆd…‘qS)Nr+)Ú.0Úl)Ú min_indentr+r,ú sz'DocTestParser.parse..)r"r"r])r¥r]r¦N)Ú expandtabsÚ _min_indentr rqÚ _EXAMPLE_REÚfinditerÚappendrƒÚcountÚ_parse_exampleÚ_IS_BLANK_OR_COMMENTrr)Úgroupr„) rhÚstringr*ÚoutputZcharnor¥Úmr¤r¦rur§r+)r¸r,Úparsess&     zDocTestParser.parsecCst| ||¡|||||ƒ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)rhrÃr0r*rSr¥r+r+r,Ú get_doctestšs zDocTestParser.get_doctestcCsdd„| ||¡DƒS)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|tƒr|‘qSr+)r8r)r¶Úxr+r+r,r¹±sz.DocTestParser.get_examples..)rÆ)rhrÃr*r+r+r,rǦs zDocTestParser.get_examplesc s t| d¡ƒ‰| d¡ d¡}| |ˆ||¡| |dd…dˆd||¡d ‡fdd „|Dƒ¡}| d ¡}| d¡}t|ƒdkrœt d |d ¡rœ|d =| |dˆ||t|ƒ¡d ‡fd d „|Dƒ¡}|j |¡}|rì| d¡}nd}|  |||¡} || ||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]r¤rEr&NrYr€csg|]}|ˆdd…‘qS)rXNr+)r¶Zsl)r]r+r,r¹Çsz0DocTestParser._parse_example..ruz *$rocsg|]}|ˆd…‘qS)Nr+)r¶Zwl)r]r+r,r¹Òsr‚) r)rÂrqÚ_check_prompt_blankÚ _check_prefixr rZÚmatchÚ _EXCEPTION_REÚ _find_options) rhrÅr*r¥Ú source_linesr¤ruÚ want_linesr§r¦r+)r]r,rÀ´s$      zDocTestParser._parse_examplez#\s*doctest:\s*([^\n\'"]*)$c Cs´i}xŠ|j |¡D]z}| d¡ dd¡ ¡}x^|D]V}|ddksR|dd…tkrhtd|d||fƒ‚t|dd…}|ddk||<q2WqW|r°| |¡r°td |||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&ú,rYr"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_REr½rÂrFrqr'rrÁ) rhr¤r*r¥r¦rÅZoption_stringsÚoptionÚflagr+r+r,rÎês  zDocTestParser._find_optionsz ^([ ]*)(?=\S)cCs2dd„|j |¡Dƒ}t|ƒdkr*t|ƒSdSdS)z;Return the minimum indentation of any non-blank line in `s`cSsg|] }t|ƒ‘qSr+)r))r¶r]r+r+r,r¹ sz-DocTestParser._min_indent..r"N)Ú _INDENT_REÚfindallr)Úmin)rhr\Úindentsr+r+r,r»s zDocTestParser._min_indentc Csbx\t|ƒD]P\}}t|ƒ|dkr ||ddkr td||d||||d…|fƒ‚q 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. rXrJrYz8line %r of the docstring for %s lacks blank after %s: %rr&N)Ú enumerater)r)rhÚlinesr]r*r¥r…r}r+r+r,rÊs   z!DocTestParser._check_prompt_blankcCsBxrš)r/rr¨r6Ú getmoduleZ getsourcefilerAZgetfileÚ linecacheÚgetlinesÚ__dict__r°ÚupdateÚ_findÚsort) rhÚobjr*rBr0Ú extraglobsr_rÏÚtestsr+r+r,rtMsJ$         zDocTestFinder.findcCsÂ|dkr dSt |¡dk r(|t |¡kSt |¡r>|j|jkSt |¡r|t|dƒr\|jj}nt|dƒrn|j}ndS|j |kSt  |¡r’|j |jkSt|dƒr¨|j |jkSt |t ƒr¶dSt dƒ‚dS)zY Return true if the given object is defined in the given module. NTÚ __objclass__rmz"object must be a class or function)r6rêÚ isfunctionríÚ __globals__ZismethoddescriptorrOrôrmr5Úisclassr8Úpropertyr)rhrBÚobjectZobj_modr+r+r,Ú _from_module³s(            zDocTestFinder._from_modulec Cs*|jrtd|ƒt|ƒ|kr"dSd|t|ƒ<| |||||¡}|dk rR| |¡t |¡rÂ|jrÂx^|j  ¡D]P\} } d|| f} t  t  | ¡¡sœt  | ¡rn|  || ¡rn| || | ||||¡qnWt |¡rv|jrvxžt|diƒ  ¡D]Š\} } t| tƒstdt| ƒfƒ‚t  | ¡sPt  | ¡sPt | ¡sPt| tƒsPtdt| ƒfƒ‚d|| f} | || | ||||¡qèWt  |¡r&|jr&xš|j  ¡D]Œ\} } t| tƒr´t|| ƒ} t| tƒrÌt|| ƒj} t  | ¡sðt  | ¡sðt| tƒr–|  || ¡r–d|| f} | || | ||||¡q–WdS) 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)râÚprintr³Ú _get_testr¾r6r7rãríÚitemsZ isroutineZunwrapr÷rúrïr/r8r9rr¨Ú staticmethodÚ classmethodÚ__func__rø) rhrórñr*rBrÏr0ÚseenÚtestZvalnameÚvalr+r+r,rïÏsP                 zDocTestFinder._findc CsÄt|tƒr|}nJy,|jdkr"d}n|j}t|tƒs:t|ƒ}Wnttfk rXd}YnX| ||¡}|jrt|stdS|dkr‚d}n.t|ddƒp’|j}|dd…dkr°|dd…}|j   |||||¡S)zs Return a DocTest for the given object, if it defines a docstring; otherwise, return None. Nr›r™éüÿÿÿz.pycro) r8r9r—rAÚAttributeErrorÚ _find_linenorär/r5rárÈ) rhrñr*rBr0rÏr¯r¥rSr+r+r,rýs(         zDocTestFinder._get_testcCsd}t |¡rd}t |¡rd|dkr(dSt dt|ddƒ¡}x$t|ƒD]\}}| |¡rH|}PqHWt |¡rt|j }t  |¡r„|j }t  |¡r”|j }t |¡r¤|j}t |¡r¾t|ddƒd}|dk r |dkrØ|dSt d¡}x(t|t|ƒƒD]}| ||¡rò|SqòWdS) 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*("|\'))r6r7r÷rZrÝr/rÚrÌZismethodrrõÚ__code__Z istracebackÚtb_frameZisframeÚf_codeZiscodeÚranger))rhrñrÏr¥Zpatr…r}r+r+r,r4s<          zDocTestFinder._find_lineno)NNNN) r5rmrnr—rrŽrtrúrïrýrr+r+r+r,r.s f?&c@s†eZdZdZdZddd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z e  d¡Zd dd„Zd!dd„Zd"dd„Zdd„ZdS)#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`. zF**********************************************************************Nr"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=r¡râÚ optionflagsÚoriginal_optionflagsÚtriesÚfailuresÚ_name2ftrfÚ_fakeout)rhÚcheckerrårr+r+r,rޤs  zDocTestRunner.__init__cCsH|jrD|jr.|dt|jƒdt|jƒƒn|dt|jƒdƒdS)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)rârur^r¤)rhrrÚexampler+r+r,Ú report_startÈs  zDocTestRunner.report_startcCs|jr|dƒdS)zt Report that the given example ran successfully. (Only displays a message if verbose=True) zok N)râ)rhrrrrvr+r+r,Úreport_successÕszDocTestRunner.report_successcCs&|| ||¡|j |||j¡ƒdS)z7 Report that the given example failed. N)Ú_failure_headerrÚoutput_differencer)rhrrrrvr+r+r,Úreport_failureÝs zDocTestRunner.report_failurecCs$|| ||¡dtt|ƒƒƒdS)zO Report that the given example raised an unexpected exception. zException raised: N)rr^re)rhrrrrcr+r+r,Úreport_unexpected_exceptionäsz)DocTestRunner.report_unexpected_exceptioncCs”|jg}|jrR|jdk r4|jdk r4|j|jd}nd}| d|j||jf¡n| d|jd|jf¡| d¡|j}| t|ƒ¡d |¡S)Nr&ú?zFile "%s", line %s, in %szLine %s, in %szFailed example:rE)ÚDIVIDERrSr¥r¾r*r¤r^r )rhrrrr¥r¤r+r+r,rës zDocTestRunner._failure_headerc Csžd}}|j}tdƒ\}}} |jj} xXt|jƒD]H\} } |jt@oL|dk} ||_| jr–x:| j ¡D],\}}|r‚|j|O_qf|j|M_qfW|jt @r¢q2|d7}| s¼|  ||| ¡d|j | f}y,t t | j|d|dƒ|jƒ|j ¡d}Wn4tk r‚Ynt ¡}|j ¡YnX|j ¡}|j d¡|}|dkrh| | j||jƒrä|}n|tj|dd…Žd}| s|t|ƒ7}| jdkr¢| }nB| | j||jƒrº|}n*|jt@rä| t| jƒt|ƒ|jƒrä|}||kr| sl| ||| |¡nf||kr0| s&|  ||| |¡|d7}n<|| krZ| sP| !||| |¡|d7}nd slt"d |fƒ‚|r2|jt#@r2Pq2W||_| $|||¡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"rJr&zZsingleNr3roFzunknown outcome)&rr rÚ check_outputrÚr®r r¦rþrrr*ÚexecrÝr¤r0Údebuggerr“ÚKeyboardInterruptr=rcrrbrkrur`Úformat_exception_onlyrer§rr†rrrrrrÚ_DocTestRunner__record_outcomer%)rhrÚ compileflagsrrrrÚSUCCESSÚFAILUREZBOOMZcheckÚ examplenumrÚquietZ optionflagrrSZ exceptionrvZoutcomer§r+r+r,Z__runÿs‚                   zDocTestRunner.__runcCsL|j |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"r"N)rr.r*rr)rhrrVÚtÚf2Út2r+r+r,Z__record_outcome|szDocTestRunner.__record_outcomez..+)\[(?P\d+)\]>$cCsV|j |¡}|rF| d¡|jjkrF|jjt| d¡ƒ}|jjddS|  ||¡SdS)Nr*r(T)Úkeepends) Ú%_DocTestRunner__LINECACHE_FILENAME_RErÌrÂrr*r®Úintr¤Ú splitlinesÚsave_linecache_getlines)rhrSÚmodule_globalsrÅrr+r+r,Z__patched_linecache_getlines‰s  z*DocTestRunner.__patched_linecache_getlinesTc sþ||_|dkrt|jƒ}tj‰|dkrVˆj‰ˆdks@ˆ ¡dkrHˆj}n‡‡fdd„}|jt_t  ¡}t j }t ˆƒ|_ |j  ¡|j j t _ tj|_|jt_tj}tjt_z| |||¡Sˆt_|t _ t |¡|jt_|t_|rø|j ¡ddl}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| ˆd¡ˆƒ}ˆ |¡dS)NÚbackslashreplace)r9ÚencodeÚwrite)r\)rMr–r+r,r±szDocTestRunner.run..outr")rr2r0r=rˆrMÚlowerr5rÚgettracerŒr‘r‡r!Úresetrërìr1Ú*_DocTestRunner__patched_linecache_getlinesÚ displayhookÚ__displayhook__Ú_DocTestRunner__runÚsettraceÚclearÚbuiltinsÚ_) rhrr%rÚ clear_globsZ save_traceZsave_set_traceZsave_displayhookr?r+)rMr–r,Úrun‘s<      zDocTestRunner.runc Cs²|dkr|j}g}g}g}d}}xp|j ¡D]b}|\}\} } | | ksJt‚|| 7}|| 7}| dkrn| |¡q.| dkr†| || f¡q.| |¡q.W|r |rÌtt|ƒdƒ| ¡x|D]} td| ƒqºW|r tt|ƒdƒ| ¡x |D]\} } td| | fƒqîW|rZt|jƒtt|ƒdƒ| ¡x(|D] \} \} } td| | | fƒq6W|r†t|d t|jƒd ƒt||d |d ƒ|rštd |dƒn|r¨tdƒt ||ƒ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.) rârrþrrr¾rür)rðrr%) rhråZnotestsZpassedZfailedZtotaltZtotalfrÉr*rVr*Úthingr¿r+r+r,Ú summarizeÚsR      zDocTestRunner.summarizecCsV|j}xJ|j ¡D]<\}\}}||krB||\}}||}||}||f||<qWdS)N)rrþ)rhrªÚdr*rVr*r+r,r+r+r,Úmerges zDocTestRunner.merge)NNr")N)NNT)N)r5rmrnr—rrŽrrrrrr<r$rZrÝr.r9rBrDrFr+r+r+r,rhs7 $ }   I 9c@s0eZdZdZdd„Zdd„Zdd„Zdd „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| dd¡dƒS)z= Convert string to hex-escaped ASCII string. ÚASCIIr3)r9r4)rhr\r+r+r,Ú_toAscii(szOutputChecker._toAsciicCsÌ| |¡}| |¡}||kr dS|t@sH||fdkr8dS||fdkrHdS|t@s‚t dt t¡d|¡}t dd|¡}||kr‚dS|t@r²d |  ¡¡}d |  ¡¡}||kr²dS|t @rÈt ||ƒrÈdSdS) 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. T)zTrue z1 )zFalse z0 z (?m)^%s\s*?$r›z(?m)^[^\S\n]+$rYF) rHrrrZr[ÚescapeÚBLANKLINE_MARKERrr rqrrz)rhrurvrr+r+r,r.s0     zOutputChecker.check_outputcCs<|ttBtB@sdS|t@r dS| d¡dko:| d¡dkS)NFTrEr3)r r r r¿)rhrurvrr+r+r,Ú_do_a_fancy_diffms zOutputChecker._do_a_fancy_diffc Cs8|j}|t@st dt|¡}| |||¡rì|jdd}|jdd}|t@rptj ||dd}t |ƒdd…}d}nf|t @ržtj ||dd}t |ƒdd…}d}n8|t @rÊtjtjd } t |  ||¡ƒ}d }n d sÖtd ƒ‚d |td |¡ƒS|r |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 +actualr"zBad diff optionzDifferences (%s): r›zExpected: %sGot: %szExpected: %sGot nothing zExpected nothing Got: %szExpected nothing Got nothing )rurrZr[rJrKr0r ÚdifflibZ unified_diffÚlistr Z context_diffr ZDifferZIS_CHARACTER_JUNKZcomparerrr^r ) rhrrvrrurÐZ got_linesZdiffZkindZenginer+r+r,r„s6      zOutputChecker.output_differenceN)r5rmrnr—rHrrKrr+r+r+r,r s ?c@s eZdZdZdd„Zdd„ZdS)rzÖA 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)rrrv)rhrrrvr+r+r,r޽szDocTestFailure.__init__cCs t|jƒS)N)r9r)rhr+r+r,Ú__str__ÂszDocTestFailure.__str__N)r5rmrnr—rŽrOr+r+r+r,r²s c@s eZdZdZdd„Zdd„ZdS)rzæA 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)rrrc)rhrrrcr+r+r,rŽÐszUnexpectedException.__init__cCs t|jƒS)N)r9r)rhr+r+r,rOÕszUnexpectedException.__str__N)r5rmrnr—rŽrOr+r+r+r,rÅs c@s*eZdZdZd dd„Zdd„Zdd „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$t ||||d¡}|r |j ¡|S)NF)rrBr0r>)rhrr%rrAÚrr+r+r,rB3s zDebugRunner.runcCst|||ƒ‚dS)N)r)rhrrrrcr+r+r,r9sz'DebugRunner.report_unexpected_exceptioncCst|||ƒ‚dS)N)r)rhrrrrvr+r+r,r<szDebugRunner.report_failure)NNT)r5rmrnr—rBrrr+r+r+r,rØsY TFc Csº|dkrtj d¡}t |¡s,td|fƒ‚|dkr:|j}t|d} |rVt||d} n t ||d} x$| j ||||dD]} |   | ¡qvW|r”|   ¡t dkr¢| a n t  | ¡t| j| jƒS)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. Nršztestmod: module required; %r)rè)rår)r0rò)r=r>r.r6r7rAr5rrrrtrBrDÚmasterrFr%rr) rÅr*r0råÚreportrròÚraise_on_errorrèÚfinderÚrunnerrr+r+r,rHs$E     c CsÞ|r|stdƒ‚t|||| pdƒ\} }|dkr:tj |¡}|dkrHi}n| ¡}|dk rb| |¡d|krrd|d<| r„t||d} n t||d} |   | |||d¡}|   |¡|r¸|   ¡t dkrÆ| a n t   | ¡t| j| jƒS)a Test examples in the given file. Return (#failures, #tests). Optional keyword arg "module_relative" specifies how filenames should be interpreted: - If "module_relative" is True (the default), then "filename" specifies a module-relative path. By default, this path is relative to the calling module's directory; but if the "package" argument is specified, then it is relative to that package. To ensure os-independence, "filename" should use "/" characters to separate path segments, and should not be an absolute path (i.e., it may not begin with "/"). - If "module_relative" is False, then "filename" specifies an os-specific path. The path may be absolute or relative (to the current working directory). Optional keyword arg "name" gives the name of the test; by default use the file's basename. Optional keyword argument "package" is a Python package or the name of a Python package whose directory should be used as the base directory for a module relative filename. If no package is 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. Optional keyword arg "globs" gives a dict to be used as the globals when executing examples; by default, use {}. 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. 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. 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. Optional keyword arg "parser" specifies a DocTestParser (or subclass) that should be used to extract tests from the files. Optional keyword arg "encoding" specifies an encoding that should be used to convert the file to unicode. 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. z8Package may only be specified for module-relative paths.zutf-8Nr5rš)rårr")rrWržrŸÚbasenamer°rîrrrÈrBrDrQrFr%rr)rSrUr*rTr0rårRrròrSrærMÚtextrUrr+r+r,r°s0R     ÚNoNamec CsDt|dd}t||d}x&|j|||dD]}|j||dq*WdS)ar Test examples in the given object's docstring (`f`), using `globs` as globals. Optional argument `name` is used in failure messages. If the optional argument `verbose` is true, then generate output even if there are no failures. `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`. Optional keyword arg `optionflags` specifies options for the testing and output. See the documentation for `testmod` for more information. F)rårç)rår)r0)r%N)rrrtrB) rVr0rår*r%rrTrUrr+r+r,r+s  cCs"|t@|krtd|ƒ‚t}|a|S)a?Sets the unittest option flags. The old flag is returned so that a runner could restore the old value if it wished to: >>> 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)r1Úoldr+r+r,rHs   c@sjeZdZddd„Zdd„Zdd„Zd d „Zd d „Zd d„Zdd„Z dd„Z dd„Z dd„Z e Z dd„ZdS)Ú DocTestCaser"NcCs.tj |¡||_||_||_||_||_dS)N)ÚunittestÚTestCaserŽÚ_dt_optionflagsÚ _dt_checkerÚ_dt_testÚ _dt_setUpÚ _dt_tearDown)rhrrÚsetUpÚtearDownrr+r+r,rŽns  zDocTestCase.__init__cCs|j}|jdk r| |¡dS)N)r`ra)rhrr+r+r,rcxs zDocTestCase.setUpcCs(|j}|jdk r| |¡|j ¡dS)N)r`rbr0r>)rhrr+r+r,rd~s  zDocTestCase.tearDowncCs~|j}tj}tƒ}|j}|t@s(|tO}t||jdd}z d|_ |j ||j dd\}}Wd|t_X|rz|  |  | ¡¡¡‚dS)NF)rrråzF----------------------------------------------------------------------)rrA)r`r=rˆr#r^r rYrr_rrBr5ZfailureExceptionÚformat_failurerb)rhrrZÚnewrrUrrr+r+r,ÚrunTest†s zDocTestCase.runTestcCsP|j}|jdkrd}n d|j}d |j d¡dd…¡}d|j|j|||fS)Nzunknown line numberz%sr€roz:Failed doctest test for %s File "%s", line %s, in %s %s)r`r¥r r*rqrS)rhÚerrrr¥Zlnamer+r+r,režs  zDocTestCase.format_failurecCs6| ¡t|j|jdd}|j|jdd| ¡dS)aÒRun 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)rrrå)rAN)rcrr^r_rBr`rd)rhrUr+r+r,r!ªs B zDocTestCase.debugcCs|jjS)N)r`r*)rhr+r+r,r³òszDocTestCase.idcCsPt|ƒt|ƒk rtS|j|jkoN|j|jkoN|j|jkoN|j|jkoN|j|jkS)N)r¨r©r`r^rarbr_)rhrªr+r+r,r«õs    zDocTestCase.__eq__cCst|j|j|j|jfƒS)N)r¬r^rarbr_)rhr+r+r,r­ÿszDocTestCase.__hash__cCs,|jj d¡}d|dd |dd…¡fS)Nr€z%s (%s)ro)r`r*rqr )rhr*r+r+r,r² szDocTestCase.__repr__cCs d|jjS)Nz Doctest: )r`r*)rhr+r+r,ÚshortDescription szDocTestCase.shortDescription)r"NNN)r5rmrnrŽrcrdrgrer!r³r«r­r²rOrir+r+r+r,r[ls  H r[c@s0eZdZdd„Zdd„Zdd„Zdd„ZeZd S) ÚSkipDocTestCasecCs||_t |d¡dS)N)rBr[rŽ)rhrBr+r+r,rŽ szSkipDocTestCase.__init__cCs| d¡dS)Nz-DocTestSuite will not work with -O2 and above)ZskipTest)rhr+r+r,rc szSkipDocTestCase.setUpcCsdS)Nr+)rhr+r+r,Ú test_skip szSkipDocTestCase.test_skipcCs d|jjS)NzSkipping tests from %s)rBr5)rhr+r+r,ri sz SkipDocTestCase.shortDescriptionN)r5rmrnrŽrcrkrirOr+r+r+r,rj s rjc@seZdZdd„ZdS)Ú _DocTestSuitecCsdS)Nr+)rhÚindexr+r+r,Ú_removeTestAtIndex sz _DocTestSuite._removeTestAtIndexN)r5rmrnrnr+r+r+r,rl srlc Ks¾|dkrtƒ}t|ƒ}|j|||d}|sNtjjdkrNtƒ}| t|ƒ¡|S|  ¡tƒ}x\|D]T}t |j ƒdkrvqb|j s¤|j }|dd…dkrž|dd…}||_ | t|f|Ž¡qbW|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)r0ròr3r"rz.pycro)rrCrtr=r1ÚoptimizerlÚaddTestrjrðr)r®rSr™r[) rBr0ròZ test_finderr¦róÚsuiterrSr+r+r,r# s(%  c@s(eZdZdd„Zdd„ZeZdd„ZdS)Ú DocFileCasecCsd |jj d¡¡S)Nr@r€)r r`r*rq)rhr+r+r,r³e szDocFileCase.idcCs|jjS)N)r`rS)rhr+r+r,r²h szDocFileCase.__repr__cCsd|jj|jj|fS)Nz2Failed doctest test for %s File "%s", line 0 %s)r`r*rS)rhrhr+r+r,rel szDocFileCase.format_failureN)r5rmrnr³r²rOrer+r+r+r,rrc srrc Ksv|dkri}n| ¡}|r&|s&tdƒ‚t||||p4dƒ\}}d|krL||d<tj |¡}| ||||d¡} t| f|ŽS)Nz8Package may only be specified for module-relative paths.zutf-8r™r")r°rrWržrŸrVrÈrr) rŸrUrTr0rærMr¦Údocr*rr+r+r,Ú DocFileTestq s rtcOsHtƒ}| dd¡r$t| d¡ƒ|d<x|D]}| t|f|Ž¡q*W|S)a‘A 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. rUTrT)rlr.rCrprt)ÚpathsÚkwrqrŸr+r+r,r‹ s 8  cCsÚg}xˆtƒ |¡D]x}t|tƒrj| |jdd…¡|j}|rŠ| d¡|dd„| d¡dd…Dƒ7}q|dd„| d¡dd…Dƒ7}qWx|rª|ddkrª| ¡qWx|rÊ|d dkrÊ| d ¡q®Wd  |¡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 Nroz # Expected:cSsg|] }d|‘qS)z## r+)r¶r·r+r+r,r¹ sz(script_from_examples..rEcSsg|] }t|ƒ‘qSr+)r~)r¶r·r+r+r,r¹ sr{r") rrÆr8rr¾r¤rurqÚpopr )r\rÄZpiecerur+r+r,rÔ s:  " csJt|ƒ}tƒ |¡}‡fdd„|Dƒ}|s4tˆdƒ‚|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|]}|jˆkr|‘qSr+)r*)r¶r*)r*r+r,r¹/ sztestsource..znot found in testsr")rCrrtrrr¯)rBr*rórÚtestsrcr+)r*r,r& s   cCst|ƒ}t|||ƒdS)z4Debug a single doctest docstring, in argument `src`'N)rÚ debug_script)ÚsrcÚpmr0rxr+r+r,r 6 scCs”ddl}|r| ¡}ni}|rvyt|||ƒWqtt ¡dƒ|jdd}| ¡| dt ¡d¡YqXn|jdd  d|||¡dS)z7Debug a test script. `src` is the script, as a string.r"Nr&T)r‰r3zexec(%r)) rŒr°r rür=rcrr8Z interactionrB)rzr{r0rŒÚpr+r+r,ry; s  rycCs$t|ƒ}t||ƒ}t|||jƒdS)zåDebug 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)rCrryrí)rBr*r{rxr+r+r,r!O s c@s(eZdZdZdd„Zdd„Zdd„ZdS) Ú _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)z„val -> _TestClass object with associated value val. >>> t = _TestClass(123) >>> print(t.get()) 123 N)r)rhrr+r+r,rŽk sz_TestClass.__init__cCs|jd|_|S)zosquare() -> square TestClass's associated value >>> _TestClass(13).square().get() 169 r3)r)rhr+r+r,Úsquareu s z_TestClass.squarecCs|jS)z~get() -> return TestClass's associated value. >>> x = _TestClass(-42) >>> print(x.get()) -42 )r)rhr+r+r,r. sz_TestClass.getN)r5rmrnr—rŽr~r.r+r+r+r,r}] 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}rÃzbool-int equivalencez blank linesZellipsiszwhitespace normalizationc Cs*ddl}|jdd}|jdddddd |jd d d t ¡gd d|jddddd|jdddd| ¡}|j}|j}d}x|jD]}|t|O}q„W|j r¦|t O}x~|D]v}|  d¡rt j  |¡\}}tj  d|¡t|dd…ƒ} tj d=t| ||d\} } nt|d||d\} } | r¬dSq¬WdS)Nr"zdoctest runner)Z descriptionz-vz --verboseÚ store_trueFz'print very verbose output for all tests)ÚactionÚdefaultÚhelpz-oz--optionr¾zqspecify a doctest option flag to apply to the test run; may be specified more than once to apply multiple options)r€Úchoicesrr‚z-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))r€r‚r_rÒz file containing the tests to run)Únargsr‚z.pyéýÿÿÿ)rår)rUrårr&)ÚargparseÚArgumentParserÚ add_argumentr'ÚkeysÚ parse_argsr_rårÔZ fail_fastrrgržrŸrqr=Úinsertr:rr) r†rær•Z testfilesrår¦rÔrSÚdirnamerÅrr@r+r+r,Ú_test¼ s>       rrš)r3)rX) NNNNTr"NFF)FrXNr")NNNN)FN)FN)F)Sr—Z __docformat__Ú__all__r-rMr6rëržrŒrZr=r`r\Úior#Ú collectionsr$r%r'rrrrrrrrr r r r rr rJrpr2rCrIrWr^rerfrzr~r†rr‡rNrrrrrrÚ ExceptionrrrrQrrrrYrr]r[rjZ TestSuiterlrrrrtrrrr ryr!r}rûrr5Úexitr+r+r+r,Ú.s      1%.DKl<;n f x $! @ IR   ,  -