/opt/alt/python-internal/lib64/python3.11/__pycache__
NameSizeModeActions
abc.cpython-311.opt-1.pyc90600644editdlrm
abc.cpython-311.opt-2.pyc58600644editdlrm
abc.cpython-311.pyc90600644editdlrm
aifc.cpython-311.opt-1.pyc455280644editdlrm
aifc.cpython-311.opt-2.pyc403210644editdlrm
aifc.cpython-311.pyc455280644editdlrm
antigravity.cpython-311.opt-1.pyc12760644editdlrm
antigravity.cpython-311.opt-2.pyc11390644editdlrm
antigravity.cpython-311.pyc12760644editdlrm
argparse.cpython-311.opt-1.pyc1137110644editdlrm
argparse.cpython-311.opt-2.pyc1040080644editdlrm
argparse.cpython-311.pyc1140020644editdlrm
ast.cpython-311.opt-1.pyc1094220644editdlrm
ast.cpython-311.opt-2.pyc1010510644editdlrm
ast.cpython-311.pyc1096830644editdlrm
asynchat.cpython-311.opt-1.pyc119060644editdlrm
asynchat.cpython-311.opt-2.pyc105500644editdlrm
asynchat.cpython-311.pyc119060644editdlrm
asyncore.cpython-311.opt-1.pyc282080644editdlrm
asyncore.cpython-311.opt-2.pyc270030644editdlrm
asyncore.cpython-311.pyc282080644editdlrm
base64.cpython-311.opt-1.pyc280400644editdlrm
base64.cpython-311.opt-2.pyc234400644editdlrm
base64.cpython-311.pyc284660644editdlrm
bdb.cpython-311.opt-1.pyc386930644editdlrm
bdb.cpython-311.opt-2.pyc293480644editdlrm
bdb.cpython-311.pyc386930644editdlrm
bisect.cpython-311.opt-1.pyc37200644editdlrm
bisect.cpython-311.opt-2.pyc24260644editdlrm
bisect.cpython-311.pyc37200644editdlrm
bz2.cpython-311.opt-1.pyc161820644editdlrm
bz2.cpython-311.opt-2.pyc113000644editdlrm
bz2.cpython-311.pyc161820644editdlrm
calendar.cpython-311.opt-1.pyc447600644editdlrm
calendar.cpython-311.opt-2.pyc405290644editdlrm
calendar.cpython-311.pyc447600644editdlrm
cgi.cpython-311.opt-1.pyc438810644editdlrm
cgi.cpython-311.opt-2.pyc353510644editdlrm
cgi.cpython-311.pyc438810644editdlrm
cgitb.cpython-311.opt-1.pyc189010644editdlrm
cgitb.cpython-311.opt-2.pyc173340644editdlrm
cgitb.cpython-311.pyc189010644editdlrm
chunk.cpython-311.opt-1.pyc74460644editdlrm
chunk.cpython-311.opt-2.pyc53420644editdlrm
chunk.cpython-311.pyc74460644editdlrm
cmd.cpython-311.opt-1.pyc206170644editdlrm
cmd.cpython-311.opt-2.pyc152820644editdlrm
cmd.cpython-311.pyc206170644editdlrm
code.cpython-311.opt-1.pyc139210644editdlrm
code.cpython-311.opt-2.pyc87310644editdlrm
code.cpython-311.pyc139210644editdlrm
codecs.cpython-311.opt-1.pyc452640644editdlrm
codecs.cpython-311.opt-2.pyc299050644editdlrm
codecs.cpython-311.pyc452640644editdlrm
codeop.cpython-311.opt-1.pyc77500644editdlrm
codeop.cpython-311.opt-2.pyc47510644editdlrm
codeop.cpython-311.pyc77500644editdlrm
colorsys.cpython-311.opt-1.pyc49710644editdlrm
colorsys.cpython-311.opt-2.pyc43640644editdlrm
colorsys.cpython-311.pyc49710644editdlrm
compileall.cpython-311.opt-1.pyc216050644editdlrm
compileall.cpython-311.opt-2.pyc183710644editdlrm
compileall.cpython-311.pyc216050644editdlrm
configparser.cpython-311.opt-1.pyc718270644editdlrm
configparser.cpython-311.opt-2.pyc568610644editdlrm
configparser.cpython-311.pyc718270644editdlrm
contextlib.cpython-311.opt-1.pyc330720644editdlrm
contextlib.cpython-311.opt-2.pyc269480644editdlrm
contextlib.cpython-311.pyc330890644editdlrm
contextvars.cpython-311.opt-1.pyc3190644editdlrm
contextvars.cpython-311.opt-2.pyc3190644editdlrm
contextvars.cpython-311.pyc3190644editdlrm
copy.cpython-311.opt-1.pyc112070644editdlrm
copy.cpython-311.opt-2.pyc89240644editdlrm
copy.cpython-311.pyc112070644editdlrm
copyreg.cpython-311.opt-1.pyc81660644editdlrm
copyreg.cpython-311.opt-2.pyc73870644editdlrm
copyreg.cpython-311.pyc82000644editdlrm
cProfile.cpython-311.opt-1.pyc90940644editdlrm
cProfile.cpython-311.opt-2.pyc86310644editdlrm
cProfile.cpython-311.pyc90940644editdlrm
crypt.cpython-311.opt-1.pyc58580644editdlrm
crypt.cpython-311.opt-2.pyc52110644editdlrm
crypt.cpython-311.pyc58580644editdlrm
csv.cpython-311.opt-1.pyc200760644editdlrm
csv.cpython-311.opt-2.pyc180580644editdlrm
csv.cpython-311.pyc200760644editdlrm
dataclasses.cpython-311.opt-1.pyc471940644editdlrm
dataclasses.cpython-311.opt-2.pyc435720644editdlrm
dataclasses.cpython-311.pyc472450644editdlrm
datetime.cpython-311.opt-1.pyc981680644editdlrm
datetime.cpython-311.opt-2.pyc903210644editdlrm
datetime.cpython-311.pyc1013560644editdlrm
decimal.cpython-311.opt-1.pyc5630644editdlrm
decimal.cpython-311.opt-2.pyc5630644editdlrm
decimal.cpython-311.pyc5630644editdlrm
difflib.cpython-311.opt-1.pyc816180644editdlrm
difflib.cpython-311.opt-2.pyc483490644editdlrm
difflib.cpython-311.pyc816680644editdlrm
dis.cpython-311.opt-1.pyc366610644editdlrm
dis.cpython-311.opt-2.pyc323040644editdlrm
dis.cpython-311.pyc367010644editdlrm
doctest.cpython-311.opt-1.pyc1126370644editdlrm
doctest.cpython-311.opt-2.pyc775780644editdlrm
doctest.cpython-311.pyc1130260644editdlrm
enum.cpython-311.opt-1.pyc880160644editdlrm
enum.cpython-311.opt-2.pyc785820644editdlrm
enum.cpython-311.pyc880160644editdlrm
filecmp.cpython-311.opt-1.pyc157300644editdlrm
filecmp.cpython-311.opt-2.pyc131120644editdlrm
filecmp.cpython-311.pyc157300644editdlrm
fileinput.cpython-311.opt-1.pyc211880644editdlrm
fileinput.cpython-311.opt-2.pyc157350644editdlrm
fileinput.cpython-311.pyc211880644editdlrm
fnmatch.cpython-311.opt-1.pyc73450644editdlrm
fnmatch.cpython-311.opt-2.pyc61620644editdlrm
fnmatch.cpython-311.pyc74910644editdlrm
fractions.cpython-311.opt-1.pyc292630644editdlrm
fractions.cpython-311.opt-2.pyc222000644editdlrm
fractions.cpython-311.pyc292630644editdlrm
ftplib.cpython-311.opt-1.pyc476670644editdlrm
ftplib.cpython-311.opt-2.pyc375070644editdlrm
ftplib.cpython-311.pyc476670644editdlrm
functools.cpython-311.opt-1.pyc466550644editdlrm
functools.cpython-311.opt-2.pyc400670644editdlrm
functools.cpython-311.pyc466550644editdlrm
genericpath.cpython-311.opt-1.pyc68580644editdlrm
genericpath.cpython-311.opt-2.pyc57810644editdlrm
genericpath.cpython-311.pyc68580644editdlrm
getopt.cpython-311.opt-1.pyc96850644editdlrm
getopt.cpython-311.opt-2.pyc71440644editdlrm
getopt.cpython-311.pyc97520644editdlrm
getpass.cpython-311.opt-1.pyc75330644editdlrm
getpass.cpython-311.opt-2.pyc63650644editdlrm
getpass.cpython-311.pyc75330644editdlrm
gettext.cpython-311.opt-1.pyc242720644editdlrm
gettext.cpython-311.opt-2.pyc235980644editdlrm
gettext.cpython-311.pyc242720644editdlrm
glob.cpython-311.opt-1.pyc111510644editdlrm
glob.cpython-311.opt-2.pyc102100644editdlrm
glob.cpython-311.pyc112290644editdlrm
graphlib.cpython-311.opt-1.pyc110050644editdlrm
graphlib.cpython-311.opt-2.pyc76110644editdlrm
graphlib.cpython-311.pyc110870644editdlrm
gzip.cpython-311.opt-1.pyc337390644editdlrm
gzip.cpython-311.opt-2.pyc294370644editdlrm
gzip.cpython-311.pyc337390644editdlrm
hashlib.cpython-311.opt-1.pyc123580644editdlrm
hashlib.cpython-311.opt-2.pyc113690644editdlrm
hashlib.cpython-311.pyc123580644editdlrm
heapq.cpython-311.opt-1.pyc205960644editdlrm
heapq.cpython-311.opt-2.pyc175050644editdlrm
heapq.cpython-311.pyc205960644editdlrm
hmac.cpython-311.opt-1.pyc114910644editdlrm
hmac.cpython-311.opt-2.pyc90230644editdlrm
hmac.cpython-311.pyc114910644editdlrm
imaplib.cpython-311.opt-1.pyc668510644editdlrm
imaplib.cpython-311.opt-2.pyc545490644editdlrm
imaplib.cpython-311.pyc690700644editdlrm
imghdr.cpython-311.opt-1.pyc78610644editdlrm
imghdr.cpython-311.opt-2.pyc77010644editdlrm
imghdr.cpython-311.pyc78610644editdlrm
imp.cpython-311.opt-1.pyc164800644editdlrm
imp.cpython-311.opt-2.pyc141930644editdlrm
imp.cpython-311.pyc164800644editdlrm
inspect.cpython-311.opt-1.pyc1412980644editdlrm
inspect.cpython-311.opt-2.pyc1159200644editdlrm
inspect.cpython-311.pyc1416680644editdlrm
io.cpython-311.opt-1.pyc50580644editdlrm
io.cpython-311.opt-2.pyc35680644editdlrm
io.cpython-311.pyc50580644editdlrm
ipaddress.cpython-311.opt-1.pyc996910644editdlrm
ipaddress.cpython-311.opt-2.pyc742470644editdlrm
ipaddress.cpython-311.pyc996910644editdlrm
keyword.cpython-311.opt-1.pyc10900644editdlrm
keyword.cpython-311.opt-2.pyc6810644editdlrm
keyword.cpython-311.pyc10900644editdlrm
linecache.cpython-311.opt-1.pyc74660644editdlrm
linecache.cpython-311.opt-2.pyc62770644editdlrm
linecache.cpython-311.pyc74660644editdlrm
locale.cpython-311.opt-1.pyc644210644editdlrm
locale.cpython-311.opt-2.pyc599750644editdlrm
locale.cpython-311.pyc644210644editdlrm
lzma.cpython-311.opt-1.pyc167390644editdlrm
lzma.cpython-311.opt-2.pyc106440644editdlrm
lzma.cpython-311.pyc167390644editdlrm
mailbox.cpython-311.opt-1.pyc1245350644editdlrm
mailbox.cpython-311.opt-2.pyc1190540644editdlrm
mailbox.cpython-311.pyc1246370644editdlrm
mailcap.cpython-311.opt-1.pyc128050644editdlrm
mailcap.cpython-311.opt-2.pyc112710644editdlrm
mailcap.cpython-311.pyc128050644editdlrm
mimetypes.cpython-311.opt-1.pyc261470644editdlrm
mimetypes.cpython-311.opt-2.pyc202110644editdlrm
mimetypes.cpython-311.pyc261470644editdlrm
modulefinder.cpython-311.opt-1.pyc309370644editdlrm
modulefinder.cpython-311.opt-2.pyc300550644editdlrm
modulefinder.cpython-311.pyc310400644editdlrm
netrc.cpython-311.opt-1.pyc99100644editdlrm
netrc.cpython-311.opt-2.pyc96840644editdlrm
netrc.cpython-311.pyc99100644editdlrm
nntplib.cpython-311.opt-1.pyc501820644editdlrm
nntplib.cpython-311.opt-2.pyc388910644editdlrm
nntplib.cpython-311.pyc501820644editdlrm
ntpath.cpython-311.opt-1.pyc309820644editdlrm
ntpath.cpython-311.opt-2.pyc290330644editdlrm
ntpath.cpython-311.pyc309820644editdlrm
nturl2path.cpython-311.opt-1.pyc35100644editdlrm
nturl2path.cpython-311.opt-2.pyc31040644editdlrm
nturl2path.cpython-311.pyc35100644editdlrm
numbers.cpython-311.opt-1.pyc152720644editdlrm
numbers.cpython-311.opt-2.pyc116780644editdlrm
numbers.cpython-311.pyc152720644editdlrm
opcode.cpython-311.opt-1.pyc138740644editdlrm
opcode.cpython-311.opt-2.pyc137330644editdlrm
opcode.cpython-311.pyc138740644editdlrm
operator.cpython-311.opt-1.pyc187810644editdlrm
operator.cpython-311.opt-2.pyc165640644editdlrm
operator.cpython-311.pyc187810644editdlrm
optparse.cpython-311.opt-1.pyc736320644editdlrm
optparse.cpython-311.opt-2.pyc614140644editdlrm
optparse.cpython-311.pyc737380644editdlrm
os.cpython-311.opt-1.pyc490280644editdlrm
os.cpython-311.opt-2.pyc370000644editdlrm
os.cpython-311.pyc490460644editdlrm
pathlib.cpython-311.opt-1.pyc677420644editdlrm
pathlib.cpython-311.opt-2.pyc593090644editdlrm
pathlib.cpython-311.pyc677420644editdlrm
pdb.cpython-311.opt-1.pyc867100644editdlrm
pdb.cpython-311.opt-2.pyc729700644editdlrm
pdb.cpython-311.pyc868300644editdlrm
pickle.cpython-311.opt-1.pyc866570644editdlrm
pickle.cpython-311.opt-2.pyc808420644editdlrm
pickle.cpython-311.pyc869160644editdlrm
pickletools.cpython-311.opt-1.pyc845770644editdlrm
pickletools.cpython-311.opt-2.pyc756630644editdlrm
pickletools.cpython-311.pyc867530644editdlrm
pipes.cpython-311.opt-1.pyc119880644editdlrm
pipes.cpython-311.opt-2.pyc91650644editdlrm
pipes.cpython-311.pyc119880644editdlrm
pkgutil.cpython-311.opt-1.pyc316000644editdlrm
pkgutil.cpython-311.opt-2.pyc249440644editdlrm
pkgutil.cpython-311.pyc316000644editdlrm
platform.cpython-311.opt-1.pyc437430644editdlrm
platform.cpython-311.opt-2.pyc357840644editdlrm
platform.cpython-311.pyc437430644editdlrm
plistlib.cpython-311.opt-1.pyc458110644editdlrm
plistlib.cpython-311.opt-2.pyc433830644editdlrm
plistlib.cpython-311.pyc459610644editdlrm
poplib.cpython-311.opt-1.pyc209900644editdlrm
poplib.cpython-311.opt-2.pyc161740644editdlrm
poplib.cpython-311.pyc209900644editdlrm
posixpath.cpython-311.opt-1.pyc201990644editdlrm
posixpath.cpython-311.opt-2.pyc185700644editdlrm
posixpath.cpython-311.pyc201990644editdlrm
pprint.cpython-311.opt-1.pyc335300644editdlrm
pprint.cpython-311.opt-2.pyc313790644editdlrm
pprint.cpython-311.pyc335850644editdlrm
profile.cpython-311.opt-1.pyc235060644editdlrm
profile.cpython-311.opt-2.pyc205410644editdlrm
profile.cpython-311.pyc239760644editdlrm
pstats.cpython-311.opt-1.pyc418890644editdlrm
pstats.cpython-311.opt-2.pyc390110644editdlrm
pstats.cpython-311.pyc418890644editdlrm
pty.cpython-311.opt-1.pyc84620644editdlrm
pty.cpython-311.opt-2.pyc77060644editdlrm
pty.cpython-311.pyc84620644editdlrm
pyclbr.cpython-311.opt-1.pyc159000644editdlrm
pyclbr.cpython-311.opt-2.pyc128720644editdlrm
pyclbr.cpython-311.pyc159000644editdlrm
pydoc.cpython-311.opt-1.pyc1582670644editdlrm
pydoc.cpython-311.opt-2.pyc1486430644editdlrm
pydoc.cpython-311.pyc1583270644editdlrm
py_compile.cpython-311.opt-1.pyc107960644editdlrm
py_compile.cpython-311.opt-2.pyc74840644editdlrm
py_compile.cpython-311.pyc107960644editdlrm
queue.cpython-311.opt-1.pyc164750644editdlrm
queue.cpython-311.opt-2.pyc122130644editdlrm
queue.cpython-311.pyc164750644editdlrm
quopri.cpython-311.opt-1.pyc104870644editdlrm
quopri.cpython-311.opt-2.pyc94850644editdlrm
quopri.cpython-311.pyc108790644editdlrm
random.cpython-311.opt-1.pyc345460644editdlrm
random.cpython-311.opt-2.pyc274390644editdlrm
random.cpython-311.pyc345460644editdlrm
reprlib.cpython-311.opt-1.pyc97000644editdlrm
reprlib.cpython-311.opt-2.pyc95500644editdlrm
reprlib.cpython-311.pyc97000644editdlrm
rlcompleter.cpython-311.opt-1.pyc90320644editdlrm
rlcompleter.cpython-311.opt-2.pyc63960644editdlrm
rlcompleter.cpython-311.pyc90320644editdlrm
runpy.cpython-311.opt-1.pyc161380644editdlrm
runpy.cpython-311.opt-2.pyc137230644editdlrm
runpy.cpython-311.pyc161380644editdlrm
sched.cpython-311.opt-1.pyc84240644editdlrm
sched.cpython-311.opt-2.pyc54380644editdlrm
sched.cpython-311.pyc84240644editdlrm
secrets.cpython-311.opt-1.pyc28840644editdlrm
secrets.cpython-311.opt-2.pyc18620644editdlrm
secrets.cpython-311.pyc28840644editdlrm
selectors.cpython-311.opt-1.pyc285610644editdlrm
selectors.cpython-311.opt-2.pyc245310644editdlrm
selectors.cpython-311.pyc285610644editdlrm
shelve.cpython-311.opt-1.pyc138950644editdlrm
shelve.cpython-311.opt-2.pyc97480644editdlrm
shelve.cpython-311.pyc138950644editdlrm
shlex.cpython-311.opt-1.pyc147250644editdlrm
shlex.cpython-311.opt-2.pyc142140644editdlrm
shlex.cpython-311.pyc147250644editdlrm
shutil.cpython-311.opt-1.pyc732660644editdlrm
shutil.cpython-311.opt-2.pyc611190644editdlrm
shutil.cpython-311.pyc732660644editdlrm
signal.cpython-311.opt-1.pyc51280644editdlrm
signal.cpython-311.opt-2.pyc49190644editdlrm
signal.cpython-311.pyc51280644editdlrm
site.cpython-311.opt-1.pyc304950644editdlrm
site.cpython-311.opt-2.pyc250540644editdlrm
site.cpython-311.pyc304950644editdlrm
smtpd.cpython-311.opt-1.pyc436870644editdlrm
smtpd.cpython-311.opt-2.pyc410840644editdlrm
smtpd.cpython-311.pyc436870644editdlrm
smtplib.cpython-311.opt-1.pyc539770644editdlrm
smtplib.cpython-311.opt-2.pyc378080644editdlrm
smtplib.cpython-311.pyc541420644editdlrm
sndhdr.cpython-311.opt-1.pyc124480644editdlrm
sndhdr.cpython-311.opt-2.pyc111190644editdlrm
sndhdr.cpython-311.pyc124480644editdlrm
socket.cpython-311.opt-1.pyc456610644editdlrm
socket.cpython-311.opt-2.pyc371280644editdlrm
socket.cpython-311.pyc457050644editdlrm
socketserver.cpython-311.opt-1.pyc370780644editdlrm
socketserver.cpython-311.opt-2.pyc265100644editdlrm
socketserver.cpython-311.pyc370780644editdlrm
sre_compile.cpython-311.opt-1.pyc8350644editdlrm
sre_compile.cpython-311.opt-2.pyc8350644editdlrm
sre_compile.cpython-311.pyc8350644editdlrm
sre_constants.cpython-311.opt-1.pyc8380644editdlrm
sre_constants.cpython-311.opt-2.pyc8380644editdlrm
sre_constants.cpython-311.pyc8380644editdlrm
sre_parse.cpython-311.opt-1.pyc8310644editdlrm
sre_parse.cpython-311.opt-2.pyc8310644editdlrm
sre_parse.cpython-311.pyc8310644editdlrm
ssl.cpython-311.opt-1.pyc736230644editdlrm
ssl.cpython-311.opt-2.pyc627940644editdlrm
ssl.cpython-311.pyc736230644editdlrm
stat.cpython-311.opt-1.pyc55600644editdlrm
stat.cpython-311.opt-2.pyc49540644editdlrm
stat.cpython-311.pyc55600644editdlrm
statistics.cpython-311.opt-1.pyc581650644editdlrm
statistics.cpython-311.opt-2.pyc386320644editdlrm
statistics.cpython-311.pyc584250644editdlrm
string.cpython-311.opt-1.pyc126600644editdlrm
string.cpython-311.opt-2.pyc115610644editdlrm
string.cpython-311.pyc126600644editdlrm
stringprep.cpython-311.opt-1.pyc264770644editdlrm
stringprep.cpython-311.opt-2.pyc262540644editdlrm
stringprep.cpython-311.pyc265490644editdlrm
struct.cpython-311.opt-1.pyc4020644editdlrm
struct.cpython-311.opt-2.pyc4020644editdlrm
struct.cpython-311.pyc4020644editdlrm
subprocess.cpython-311.opt-1.pyc846890644editdlrm
subprocess.cpython-311.opt-2.pyc727040644editdlrm
subprocess.cpython-311.pyc848310644editdlrm
sunau.cpython-311.opt-1.pyc270260644editdlrm
sunau.cpython-311.opt-2.pyc224340644editdlrm
sunau.cpython-311.pyc270260644editdlrm
symtable.cpython-311.opt-1.pyc193290644editdlrm
symtable.cpython-311.opt-2.pyc168480644editdlrm
symtable.cpython-311.pyc195290644editdlrm
sysconfig.cpython-311.opt-1.pyc317060644editdlrm
sysconfig.cpython-311.opt-2.pyc289960644editdlrm
sysconfig.cpython-311.pyc317060644editdlrm
tabnanny.cpython-311.opt-1.pyc129700644editdlrm
tabnanny.cpython-311.opt-2.pyc120420644editdlrm
tabnanny.cpython-311.pyc129700644editdlrm
tarfile.cpython-311.opt-1.pyc1348880644editdlrm
tarfile.cpython-311.opt-2.pyc1202080644editdlrm
tarfile.cpython-311.pyc1349060644editdlrm
telnetlib.cpython-311.opt-1.pyc311010644editdlrm
telnetlib.cpython-311.opt-2.pyc237660644editdlrm
telnetlib.cpython-311.pyc311010644editdlrm
tempfile.cpython-311.opt-1.pyc421800644editdlrm
tempfile.cpython-311.opt-2.pyc355570644editdlrm
tempfile.cpython-311.pyc421800644editdlrm
textwrap.cpython-311.opt-1.pyc195950644editdlrm
textwrap.cpython-311.opt-2.pyc124630644editdlrm
textwrap.cpython-311.pyc196170644editdlrm
this.cpython-311.opt-1.pyc16180644editdlrm
this.cpython-311.opt-2.pyc16180644editdlrm
this.cpython-311.pyc16180644editdlrm
threading.cpython-311.opt-1.pyc692100644editdlrm
threading.cpython-311.opt-2.pyc512470644editdlrm
threading.cpython-311.pyc703330644editdlrm
timeit.cpython-311.opt-1.pyc164740644editdlrm
timeit.cpython-311.opt-2.pyc106560644editdlrm
timeit.cpython-311.pyc164740644editdlrm
token.cpython-311.opt-1.pyc37450644editdlrm
token.cpython-311.opt-2.pyc37130644editdlrm
token.cpython-311.pyc37450644editdlrm
tokenize.cpython-311.opt-1.pyc303100644editdlrm
tokenize.cpython-311.opt-2.pyc265010644editdlrm
tokenize.cpython-311.pyc303800644editdlrm
trace.cpython-311.opt-1.pyc359840644editdlrm
trace.cpython-311.opt-2.pyc330900644editdlrm
trace.cpython-311.pyc359840644editdlrm
traceback.cpython-311.opt-1.pyc486970644editdlrm
traceback.cpython-311.opt-2.pyc387290644editdlrm
traceback.cpython-311.pyc487430644editdlrm
tracemalloc.cpython-311.opt-1.pyc291060644editdlrm
tracemalloc.cpython-311.opt-2.pyc277380644editdlrm
tracemalloc.cpython-311.pyc291060644editdlrm
tty.cpython-311.opt-1.pyc20470644editdlrm
tty.cpython-311.opt-2.pyc19490644editdlrm
tty.cpython-311.pyc20470644editdlrm
types.cpython-311.opt-1.pyc148410644editdlrm
types.cpython-311.opt-2.pyc134300644editdlrm
types.cpython-311.pyc148410644editdlrm
typing.cpython-311.opt-1.pyc1608440644editdlrm
typing.cpython-311.opt-2.pyc1237180644editdlrm
typing.cpython-311.pyc1616770644editdlrm
uu.cpython-311.opt-1.pyc88170644editdlrm
uu.cpython-311.opt-2.pyc85850644editdlrm
uu.cpython-311.pyc88170644editdlrm
uuid.cpython-311.opt-1.pyc328120644editdlrm
uuid.cpython-311.opt-2.pyc251850644editdlrm
uuid.cpython-311.pyc330890644editdlrm
warnings.cpython-311.opt-1.pyc240700644editdlrm
warnings.cpython-311.opt-2.pyc213730644editdlrm
warnings.cpython-311.pyc250830644editdlrm
wave.cpython-311.opt-1.pyc322870644editdlrm
wave.cpython-311.opt-2.pyc257750644editdlrm
wave.cpython-311.pyc323580644editdlrm
weakref.cpython-311.opt-1.pyc349380644editdlrm
weakref.cpython-311.opt-2.pyc316970644editdlrm
weakref.cpython-311.pyc349790644editdlrm
webbrowser.cpython-311.opt-1.pyc328160644editdlrm
webbrowser.cpython-311.opt-2.pyc304660644editdlrm
webbrowser.cpython-311.pyc328420644editdlrm
xdrlib.cpython-311.opt-1.pyc131640644editdlrm
xdrlib.cpython-311.opt-2.pyc126820644editdlrm
xdrlib.cpython-311.pyc131640644editdlrm
zipapp.cpython-311.opt-1.pyc115610644editdlrm
zipapp.cpython-311.opt-2.pyc104090644editdlrm
zipapp.cpython-311.pyc115610644editdlrm
zipfile.cpython-311.opt-1.pyc1190740644editdlrm
zipfile.cpython-311.opt-2.pyc1093050644editdlrm
zipfile.cpython-311.pyc1191250644editdlrm
zipimport.cpython-311.opt-1.pyc296910644editdlrm
zipimport.cpython-311.opt-2.pyc260040644editdlrm
zipimport.cpython-311.pyc298090644editdlrm
_aix_support.cpython-311.opt-1.pyc43860644editdlrm
_aix_support.cpython-311.opt-2.pyc30530644editdlrm
_aix_support.cpython-311.pyc43860644editdlrm
_bootsubprocess.cpython-311.opt-1.pyc44790644editdlrm
_bootsubprocess.cpython-311.opt-2.pyc42490644editdlrm
_bootsubprocess.cpython-311.pyc44790644editdlrm
_collections_abc.cpython-311.opt-1.pyc512350644editdlrm
_collections_abc.cpython-311.opt-2.pyc452150644editdlrm
_collections_abc.cpython-311.pyc512350644editdlrm
_compat_pickle.cpython-311.opt-1.pyc73500644editdlrm
_compat_pickle.cpython-311.opt-2.pyc73500644editdlrm
_compat_pickle.cpython-311.pyc75350644editdlrm
_compression.cpython-311.opt-1.pyc80690644editdlrm
_compression.cpython-311.opt-2.pyc78630644editdlrm
_compression.cpython-311.pyc80690644editdlrm
_markupbase.cpython-311.opt-1.pyc138360644editdlrm
_markupbase.cpython-311.opt-2.pyc134610644editdlrm
_markupbase.cpython-311.pyc141010644editdlrm
_osx_support.cpython-311.opt-1.pyc199450644editdlrm
_osx_support.cpython-311.opt-2.pyc173550644editdlrm
_osx_support.cpython-311.pyc199450644editdlrm
_pydecimal.cpython-311.opt-1.pyc2442800644editdlrm
_pydecimal.cpython-311.opt-2.pyc1641580644editdlrm
_pydecimal.cpython-311.pyc2442800644editdlrm
_pyio.cpython-311.opt-1.pyc1200930644editdlrm
_pyio.cpython-311.opt-2.pyc977180644editdlrm
_pyio.cpython-311.pyc1201580644editdlrm
_py_abc.cpython-311.opt-1.pyc78230644editdlrm
_py_abc.cpython-311.opt-2.pyc66460644editdlrm
_py_abc.cpython-311.pyc78970644editdlrm
_sitebuiltins.cpython-311.opt-1.pyc54430644editdlrm
_sitebuiltins.cpython-311.opt-2.pyc49160644editdlrm
_sitebuiltins.cpython-311.pyc54430644editdlrm
_strptime.cpython-311.opt-1.pyc279270644editdlrm
_strptime.cpython-311.opt-2.pyc242630644editdlrm
_strptime.cpython-311.pyc279270644editdlrm
_sysconfigdata_d_linux_x86_64-linux-gnu.cpython-311.opt-1.pyc630170644editdlrm
_sysconfigdata_d_linux_x86_64-linux-gnu.cpython-311.opt-2.pyc630170644editdlrm
_sysconfigdata_d_linux_x86_64-linux-gnu.cpython-311.pyc630170644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-311.opt-1.pyc635040644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-311.opt-2.pyc635040644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-311.pyc635040644editdlrm
_threading_local.cpython-311.opt-1.pyc92240644editdlrm
_threading_local.cpython-311.opt-2.pyc59150644editdlrm
_threading_local.cpython-311.pyc92240644editdlrm
_weakrefset.cpython-311.opt-1.pyc131590644editdlrm
_weakrefset.cpython-311.opt-2.pyc131590644editdlrm
_weakrefset.cpython-311.pyc131590644editdlrm
__future__.cpython-311.opt-1.pyc49330644editdlrm
__future__.cpython-311.opt-2.pyc28850644editdlrm
__future__.cpython-311.pyc49330644editdlrm
__hello__.cpython-311.opt-1.pyc10970644editdlrm
__hello__.cpython-311.opt-2.pyc10430644editdlrm
__hello__.cpython-311.pyc10970644editdlrm
Edit: /opt/alt/python-internal/lib64/python3.11/__pycache__/doctest.cpython-311.pyc (113026B)
!A?h9 dZdZgdZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl mZmZddlmZeddZiZd Zed Zed Zed Zed ZedZedZeezezezezezZedZedZedZedZedZ eezezeze zZ!dZ"dZ#dZ$dZdZ%dZ&dZ'd[dZ(dZ)Gdd eZ*d!Z+d"Z,d#Z-Gd$d%ej.Z/d&Z0Gd'd(Z1Gd)d*Z2Gd+d,Z3Gd-d.Z4Gd/d0Z5Gd1d2Z6Gd3d4e7Z8Gd5d6e7Z9Gd7d8e5Z:da; d\d;ZZ>da?d?Z@Gd@dAe jAZBGdBdCeBZCGdDdEe jDZEd^dFZFGdGdHeBZGd9dde3dfdIZHdJZIdKZJdLZKd_dMZLd_dNZMd`dOZNGdPdQZOeOdRdSdTdUdVdWZPdXZQeRdYkre jSeQdSdS)aaModule 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_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)StringIOIncrementalNewlineDecoder) namedtuple TestResultszfailed attemptedcbt|dttzS)N)OPTIONFLAGS_BY_NAME setdefaultlennames 4/opt/alt/python-internal/lib64/python3.11/doctest.pyrrs&  ) )$S9L5M5M0M N NNrrrrrrr r r r rz z...cd}tjD]9}||d}|tt|ur ||jz}:|S)z Return the compiler-flags associated with the future features that have been imported into the given namespace (globs). r#N) __future__all_feature_namesgetgetattr compiler_flag)globsflagsfnamefeatures r/_extract_future_flagsr;sV E-++))E4(( gj%00 0 0 W* *E Lr0c.tj|r|St|tr+t |t t dgS|/tjtj |j dStd)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)moduledepths r/_normalize_modulerNs> FC >&'))VXXu=== {3=//9*EFF<===r0cJtdd|dSNT)r%decode)datas r/_newline_convertrSs" $T4 0 0 7 7d C CCr0c|rt|d}t||}t|ddx} |jj}n#t $rYnwxYwt |dr;||}||}t||fSt||5}| |fcdddS#1swxYwYdS)N __loader__get_data)encoding) rN_module_relative_pathr5__spec__loaderAttributeErrorhasattrrWrQrSopenread)filenamepackagemodule_relativerXr[ file_contentsfs r/_load_testfileres@ =#GQ//((;;g|T:: :F C  )0!     6: & & ="OOH55M)00::M$M22H< < h * * *"avvxx!""""""""""""""""""s# A AA0CCCc4tjd|dz|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)sindents r/_indentrms 6,s A . ..r0ct}|\}}}tj|||||S)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_infoexcoutexc_typeexc_valexc_tbs r/_exception_tracebackrxsC ZZF (Hgv hfEEEE ??  r0ceZdZdZddZdS) _SpoofOutcftj|}|r|ds|dz }|SN )r$rrendswith)selfresults r/rrz_SpoofOut.getvalues="4((  &//$//  dNF r0NcX||tj|dSN)seekr$truncate)rsizes r/rz_SpoofOut.truncate s( $$r0r)r? __module__ __qualname__rrrr0r/rzrzs7      r0rzct|vr||kS|t}t|dksJdt|}}|d}|r*||rt|}|d=ndS|d}|r-||r|t|z}|d=ndS||krdS|D]4}||||}|dkrdS|t|z }5dS)z_ Essentially the only subtle case: >>> _ellipsis_match('aa...aa', 'aaa') False r<r#FT)ELLIPSIS_MARKERsplitr, startswithr~find)wantgotwsstartposendposws r/_ellipsis_matchrs0 d""s{ O $ $B r77a<<<<#c((fH 1A >>!   1vvH15 2A <<??  c!ff F25&u 88Ax00 a<<55CFF 4r0c<|}|rd|zSdS)z)Return a commented form of the given linez# #)rstrip)lines r/ _comment_liner@s& ;;==D Dysr0cdt|}}|d}|dkr|}|dd|}|dkr|}|dd|}|dkr|dz}|||S)Nr#r}:.r))r,rrfind)msgstartendis r/_strip_exception_detailsrHsCHH3E AAvv aAAvv #q#AAvv! ucz?r0c,eZdZdZdZddZdZdZdS)_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. ct||_d|_tj||dd|_dS)NFT)stdoutnosigintr))_OutputRedirectingPdb__out$_OutputRedirectingPdb__debugger_usedpdbPdb__init__ use_rawinput)routs r/rz_OutputRedirectingPdb.__init__hs< $ cD999r0Ncd|_|tjj}tj||dSrP)rrGrIf_backrr set_trace)rframes r/rz_OutputRedirectingPdb.set_traceps;# =MOO*E $&&&&&r0cV|jr!tj|dSdSr)rrr set_continuers r/rz"_OutputRedirectingPdb.set_continuevs5   ' G  & & & & & ' 'r0ctj}|jt_ tjj|g|R|t_S#|t_wxYwr)rGrrrrtrace_dispatch)rargs save_stdouts r/rz$_OutputRedirectingPdb.trace_dispatch|sKj Z  %7)$6666$CJJCJ $ $ $ $s AAr)r?rr__doc__rrrrrr0r/rrbs_ '''' ''' %%%%%r0rctj|std|z|drt dt jj|d}t|dr+t j|j d}n|j dkrvttjdkrLtjddkr6t jtjdd}nt j}ntt|drM|jD]E}t j||}t j|r|cSFt d |j zt j||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__))r@rArKr ValueErrorospathjoinrr]rr?r,rGargvcurdirrexists)rL test_pathbasedir directoryfullpaths r/rYrYs  F # #:/&8999C  NLMMM ys335Ivz"",'--003 J & & sx==??sx{b00gmmCHQK003GGiGG 6: & & $#_ $ $ 7<< 9==7>>(++$#OOO$3!?+,, , 7<< + ++r0c*eZdZdZ ddZdZdZdS)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#c|ds|dz }|r|ds|dz }||ds|dz }||_||_||_||_|i}||_||_dSr|)r~sourcerlinenorloptionsexc_msg)rrrrrrlrs r/rzExample.__init__st$$  dNF   d++  DLD  w'7'7'='=  tOG    ?bG  r0c t|t|urtS|j|jkoO|j|jko?|j|jko/|j|jko|j|jko|j|jkSr)typeNotImplementedrrrrlrrrothers r/__eq__zExample.__eq__s ::T%[[ ( (! !{el*-yEJ&-{el*-{el*-|u}, - |u},  -r0c\t|j|j|j|j|jfSr)hashrrrrlrrs r/__hash__zExample.__hash__s.T[$)T[$+\#$$ $r0)Nr#r#N)r?rrrrrrrr0r/rrs[!!DEF$ - - -$$$$$r0rc0eZdZdZdZdZdZdZdZdS)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. ct|tr Jd||_||_||_||_||_||_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) rBrCexamples docstringcopyr7r.r`r)rrr7r.r`rrs r/rzDocTest.__init__se h,, J JI J J,  "ZZ\\     r0c t|jdkrd}n2t|jdkrd}ndt|jz}d|jjd|jd|jd |jd |d S) Nr#z no examplesr)z 1 examplez %d examples)r,r __class__r?r.r`r)rrs r/__repr__zDocTest.__repr__s t}   " "$HH   1 $ $"HH$s4='9'99H(((DMMM4;;;B Cr0c t|t|urtS|j|jkoO|j|jko?|j|jko/|j|jko|j|jko|j|jkSr)rrrrr7r.r`rrs r/rzDocTest.__eq__*s ::T%[[ ( (! !}.+~0+zU[(+yEJ&+}. + {el*  +r0cPt|j|j|j|jfSr)rrr.r`rrs r/rzDocTest.__hash__5s!T^TY t{KLLLr0ct|tstS|j|jnd}|j|jnd}|j|j|t |f|j|j|t |fkS)Nr)rBrrrr.r`id)rrself_lno other_lnos r/__lt__zDocTest.__lt__9sv%)) "! !"&+"94;;r$)L$U^Y5 BC Dr0N) r?rrrrrrrrrr0r/rrst.    C C C + + +MMMDDDDDr0rcPeZdZdZejdejejzZejdejejzej zZ ejdj Z ddZ dZddZd Zejd ejZd Zejd ejZd ZdZdZdS)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 |}|| dkr4d fd|dD}g}d\}}|j|D],}||||||d||z }| |||\}}} } | |sK|t|| | | t| dz|||d||z }|}.|||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#r}c$g|] }|d Srr).0l min_indents r/ z'DocTestParser.parse..s!KKK1*++KKKr0r#r#rl)rrlrN) expandtabs _min_indentrr _EXAMPLE_REfinditerappendrcount_parse_example_IS_BLANK_OR_COMMENTrr,groupr) rstringr.outputcharnormrrrrrs @r/parsezDocTestParser.parsevs""$$%%f-- >>YYKKKK T8J8JKKKLLF!**622  A MM& !12 3 3 3 fll4;; ;F((D&99 -VWdG,,V44 7 wvtW+1+5c!''(:K:K6L6L+L,3 5 5 5777 fll4AEEGG<< .s6+++aa))++++r0)r)rrr.s r/rzDocTestParser.get_exampless0++4::fd33+++ +r0c F t|d |dd}|| ||||ddd zdz||d fd|D}|d }|d}t|dkrt jd |d r|d =||d z||t|zd fd |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. rlrr}r)Nrhrc*g|]}|dzdS)rfNr)rslrls r/rz0DocTestParser._parse_example..s%AAAbBvaxyyMAAAr0rz *$rc$g|] }|d Srr)rwlrls r/rz0DocTestParser._parse_example..s!;;;""VWW+;;;r0r) r,rr_check_prompt_blank _check_prefixrrimatch _EXCEPTION_RE _find_options) rrr.r source_linesrr want_linesrrrls @r/rzDocTestParser._parse_examplesQWWX&&''wwx((..t44    vtVDDD <+SZ#-=tVLLLAAAALAAABB wwvZZ%% z??Q  28FJrN#C#C 2 :s6z4!C $5$55 7 7 7yy;;;; ;;;<<   $ $T * *  ggennGGG$$VT6::wg--r0z#\s*doctest:\s*([^\n\'"]*)$c i}|j|D]}|ddd}|D]\}|ddvs|ddt vrt d|dzd|d |t |dd}|dd k||<]|r-||rt d|d|d ||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),rhr#z+-Nline z of the doctest for z has an invalid option: +z4 has an option directive on a line with no example: )_OPTION_DIRECTIVE_RErrreplacerr*rr) rrr.rrroption_stringsoptionflags r/rzDocTestParser._find_optionss1*33F;; 3 3AWWQZZ//S99??AAN( 3 31IT))122J&999$*&,Qhhhff&>???+6!"":6!'c!1  3  5t0088 5*$ffdddFF455 5r0z ^([ ]*)(?=\S)cd|j|D}t|dkrt|SdS)z;Return the minimum indentation of any non-blank line in `s`c,g|]}t|Sr)r,)rrls r/rz-DocTestParser._min_indent.. sHHH63v;;HHHr0r#) _INDENT_REfindallr,min)rrkindentss r/rzDocTestParser._min_indent sGHHT_-D-DQ-G-GHHH w<)> j"((1***ddd"&vfQh"7"7"7"?@@@ @ @r0c t|D]:\}}|r3||std||zdzd|d|;dS)z Check that every line in the given list starts with the given prefix; if any line does not, then raise a ValueError. rr)r&z& has inconsistent leading whitespace: N)r'rr)rr(prefixr.rrrs r/rzDocTestParser._check_prefix!sw !'' ; ;GAt ;DOOF33 ; j"((1***dddDD":;;; ; ;r0N)r)r?rrrricompile MULTILINEVERBOSErDOTALLrrrrrrrrrr!rrrrr0r/rrFsI"*  \BJ & ( (K,BJ Z", & 2 4 4M&2:o66<%%%%N 7 7 7 + + + +*.*.*.f&2:&D&(l448,bl;;J @ @ @ ; ; ; ; ;r0rcXeZdZdZdeddfdZd dZdZdZd Z d Z d Z 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. FTc>||_||_||_||_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)rverboseparserrecurse exclude_emptys r/rzDocTestFinder.__init__:s'"   +r0Nc |2t|dd}|tdt||durd}n|tj|} tj|}|s-tj|}|d|ddzdksd}|d}nH|tj||j }ntj|}|sd}n#t$rd}YnwxYw||i}n.|j }n| }|| |d|vrd|d<g}| ||||||i||S) aj Return a list of the DocTests that are defined by the given object's docstring, or by any of its contained objects' docstrings. The optional parameter `module` is the module that contains the given object. If the module is not specified or is None, then the test finder will attempt to automatically determine the correct module. The object's module is used: - As a default namespace, if `globs` is not specified. - To prevent the DocTestFinder from extracting DocTests from objects that are imported from other modules. - To find the name of the file containing the object. - To help find the line number of the object within its file. Contained objects whose module does not match `module` are ignored. If `module` is False, no attempt to find the module will be made. This is obscure, of use mostly in tests: if `module` is False, or is None but cannot be found automatically, then all objects are considered to belong to the (non-existent) module, so all contained objects will (recursively) be searched for doctests. The globals for each DocTest is formed by combining `globs` and `extraglobs` (bindings in `extraglobs` override bindings in `globs`). A new copy of the globals dictionary is created for each DocTest. If `globs` is not specified, then it defaults to the module's `__dict__`, if specified, or {} otherwise. If `extraglobs` is not specified, then it defaults to {}. Nr?zHDocTestFinder.find: name must be given when obj.__name__ doesn't exist: Fr#z<]>r)r5rrr@ getmodule getsourcefilegetfile linecachegetlines__dict__rKrupdate_findsort) robjr.rLr7 extraglobsrortestss r/rzDocTestFinder.findPsH <3 D11D| j"&s)))"./// U??FF ^&s++F  ((--D ?s++AwtBCCy(E11$4|# %$-#5dFO#L#LLL$-#5d#;#;L#(#'L+   LLL 0 =~,,..JJLLE  ! LL $ $ $ U " " *E*  5#tV\5"EEE   sC C C cJ|dStj||tj|uStj|r|j|juStj|stj|rBt|dr |jj }nt|dr|j }ndS|j |kStj |r|j |j kSt|dr|j |j kSt|trdStd)zY Return true if the given object is defined in the given module. NT __objclass__rz"object must be a class or function)r@r; isfunctionr@ __globals__ismethoddescriptorismethodwrapperr]rHrr?isclassrBpropertyr)rrLobjectobj_mods r/ _from_modulezDocTestFinder._from_modules; >4  v & & 2W.v666 6   ' ' C?f&88 8(00 C%f-- Cv~..  -8..  +t?g- - _V $ $ C?f&77 7 V\ * * C?f&77 7  ) ) C4ABB Br0cz|} tj|}n#t$rYnwxYwtj|S)zL Safely unwrap objects and determine if they are functions. )r@unwrapr isroutine)rrD maybe_routines r/ _is_routinezDocTestFinder._is_routinesP  #N=99MM    D  ///s  &&c |jrtd|zt||vrdSd|t|<||||||}|||t j|r|jr|j D]f\} } |d| } | | st j | r1| || r| || | ||||gt j|r|jrt|di D]\} } t| t st#dt%| t j| s\t j | sHt j| s4t| t st#dt%| |d| } | || | ||||t j |r|jr|j D]\} } t| t(t*fr| j} t j| s)t j | st| t.r8| || r"|d| } | || | ||||dSdSdS) zm Find tests for the given object and any contained objects, and add them to `tests`. zFinding tests in %sNr)r__test__z3DocTestFinder.find: __test__ keys must be strings: z^DocTestFinder.find: __test__ values must be strings, functions, methods, classes, or modules: z .__test__.)r2printr _get_testrr@rAr3r@itemsrVrMrQrBr5rBrCrrrT staticmethod classmethod__func__rN) rrFrDr.rLrr7seentestvalnamevals r/rBzDocTestFinder._finds^ = 0 '$. / / / c77d?? FRWW ~~c4 EE   LL     C  ,T] , # 2 2 4 4 , , %)TT773%%c**,goc.B.B,%%fc22,JJuc7FL$d,,,  C  (T] ( 'Z < < B B D D ( ( !'3//7$*&*7mmm&6777 )#..3'/#2F2F3(--31;C1E1E3$*'+3iii&2333/3ddGG< 5#w  $(((( ?3   ,DM , # 2 2 4 4 , , cL+#>??',C&s++,ws/C/C, h//,''44,*.ww7GJJuc7FL$d,,, , , , , , ,r0ct|tr|}nP |jd}n+|j}t|tst|}n#ttf$rd}YnwxYw|||}|jr|sdS|d}n0t|ddp|j}|dddkr |dd}|j |||||S)zs Return a DocTest for the given object, if it defines a docstring; otherwise, return None. Nrr.pycr) rBrCrrKr\ _find_linenor4r5r?r1r) rrDr.rLr7rrrr`s r/rZzDocTestFinder._get_tests c3   II ;& "II # I%i553$' NN ~.     ""3 55   y 4 >HHvz488KFOH}&&#CRC=|'' 5$(0&:: :s5AA&%A&c d}t|dd}tj|r|d}tj|rl|j|dSt jdt jt|ddz}t|D]\}}||r|}ntj |r|j }t|tr|j }tj|r*t|ddrtj|j}tj|r|j}tj|r|j}tj|r |jdz }|Z||dzSt jd}t/|t1|D]!}|||r|cS"dS) z Return a line number of the given object's docstring. Returns `None` if the given object does not have a docstring. Nrr#z^\s*class\s*%s\br?-r)z(^|.*:)\s*\w*("|\'))r5r@rArMrir+escaper'rismethodr^rBrNfgetrIrS__code__ istracebacktb_frameisframef_codeiscodeco_firstlinenoranger,)rrDrrrpatrrs r/rfzDocTestFinder._find_linenoAs CD11   C  Y%:F ?3   I$9#t*0YwsJ'D'DEEFGGC$\22  499T??FE  C 4 # c8 $ $ (C  c " " /wsIt'D'D /.%%.C  s # #73#   ,'!+F  #ax*344CL(9(9:: " "99\&122"!MMM"tr0NNNN) r?rrrrrrrQrVrBrZrfrr0r/rr1s %]]__T,,,,,ddddLCCC: 0 0 0;,;,;,z$:$:$:L44444r0rceZdZdZdZddZdZdZdZd Z d Z d Z d Z e jd ZddZddZddZdZdS)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#c|p t|_|dtjv}||_||_||_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. N-vr#) r_checkerrGrr2 optionflagsoriginal_optionflagstriesfailures_name2ftrz_fakeout)rcheckerr5rzs r/rzDocTestRunner.__init__sd" 2=?? ?ch&G &$/!   "  r0c|jrf|jr:|dt|jzdzt|jzdS|dt|jzdzdSdS)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)r2rrmr)rrr`examples r/ report_startzDocTestRunner.report_starts = +| +K''."9"99"#%,W\%:%:;<<<<<K''."9"99)*+++++  + +r0c.|jr |ddSdS)zt Report that the given example ran successfully. (Only displays a message if verbose=True) zok N)r2rrr`rrs r/report_successzDocTestRunner.report_successs) =  CKKKKK  r0c|||||j|||jzdS)z7 Report that the given example failed. N)_failure_headerryoutput_differencerzrs r/report_failurezDocTestRunner.report_failuresY D w / / M + +GS$:J K K L M M M M Mr0c||||dztt|zdS)zO Report that the given example raised an unexpected exception. zException raised: N)rrmrxrrr`rrss r/report_unexpected_exceptionz)DocTestRunner.report_unexpected_exceptions[ D w / / ! "$+,@,J,J$K$K L M M M M Mr0c|jg}|jrL|j|j|j|jzdz}nd}|d|jd|d|jn(|d|jdzd|j|d|j}|t |d|S) Nr)?zFile "", line , in zLine zFailed example:r})DIVIDERr`rrr.rrmr)rr`rrrrs r/rzDocTestRunner._failure_headers|n = I{&7>+Ew~59 JJJ vvvtyy: ; ; ; ; JJJ7>!+;+;+;TYYG H H H $%%% 76??###yy~~r0c &dx}}|j}td\}}} |jj} t |jD]#\} } |jt zo|dk} ||_| jrC| jD])\}}|r|xj|zc_|xj|zc_*|jtzr||dz }| s| ||| d|j | fz} tt| j|d|d|j|jd}n=#t$$rt'j}|jYnxYw|j}|jd|}|| | j||jr|}n t3j|dd}t7|dt8r`|djd |djd |djd ft?fd t |D}||d}d |}| s|tC|z }| j"| }n\| | j"||jr|}nB|jtFzr3| tI| j"tI||jr|}||ur| s|%||| |nT||ur | s|&||| ||dz }n0|| ur | s|'||| ||dz }n Jd|f|r|jtPzrn%||_|)|||tU||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#rUr)zsingleTNr<rrc3LK|]\}}||VdSr)r)rindexrexception_line_prefixess r/ z&DocTestRunner.__run..ksN))'E4??+BCC)))))))r0rFzunknown outcome)+rzrsry check_outputr'rr rr[rrr.execr+rr7debuggerrKeyboardInterruptrGrsrrrrrrpformat_exception_only issubclass SyntaxErrorrrnextrrxrrrrrrr_DocTestRunner__record_outcomer')rr` compileflagsrr}r|r{SUCCESSFAILUREBOOMcheck examplenumrquiet optionflagrbr` exceptionroutcome formatted_ex exc_msg_indexrrs @r/__runzDocTestRunner.__runs5 $/!&q$ *$-T]#;#;o o  J%(AA"\  4D  8)0)>)>)@)@88%Z8((J6(((((ZK7((($&  QJE 6!!#tW555 *TY ,CCH -WW^Xx)41126*>>> **,,, $    -LNN  **,,,,,-((**C M " "1 % % %G 5sD,<==&%G )> "1" N ilK88@ %Q<4777$Q<2QQYq\5NQQQ/+%)))))+4\+B+B)))%%M $0 #?L'',//;/ :::C?*"GGU7?GT5EFF*%GG%(??*u5goFF5g>>!-//*#*'!!A''T7C@@@G##A''T7C@@@A D@44S$5>@@@A :0':::u D,y8 0 dHe4448U+++s 'AD..8E(c|j|jd\}}||z||zf|j|j<|xj|z c_|xj|z c_dS)z{ Record the fact that the given DocTest (`test`) generated `f` failures out of `t` tried examples. rN)r~r4r.r}r|)rr`rdtf2t2s r/__record_outcomezDocTestRunner.__record_outcomes^ ""49e44B$%bD!B$< di    a r0z..+)\[(?P\d+)\]>$cF|j|}|rp|d|jjkrM|jjt |d}|jdS| ||S)Nr.rTkeepends) %_DocTestRunner__LINECACHE_FILENAME_RErrr`r.rintr splitlinessave_linecache_getlines)rr`module_globalsrrs r/__patched_linecache_getlinesz*DocTestRunner.__patched_linecache_getliness  ( . .x 8 8  JDIN22i(QWW\-B-B)C)CDG>,,d,;; ;//.II Ir0Tc  ||_|t|j}tj |/ j  dkr j}n fd}|jt_tj }tj }t |_ |j |j j t_ tj|_|jt_tj}tjt_ |||| t_|t_ tj||jt_|t_|r%|jddl}d|_SS# t_|t_ tj||jt_|t_|r$|jddl}d|_wxYw)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. Nutf-8czt|d}|dS)Nbackslashreplace)rCencodewrite)rkrXrs r/rzDocTestRunner.run..outs;AHHX/ABBHMMA%%a(((((r0r#)r`r;r7rGrrXlowerrrgettracerrrrresetr>r?r*_DocTestRunner__patched_linecache_getlines displayhook__displayhook___DocTestRunner__runsettraceclearbuiltins_) rr`rr clear_globs save_tracesave_set_tracesave_displayhookrrXrs @@r/runzDocTestRunner.runs(  0<>#3#3w#>#>!'))))))] \^^ -k::   / (1'9$!> ?- "::dL#66$CJ*CM L $ $ $!%!=I .CO "   """!  " %CJ*CM L $ $ $!%!=I .CO "   """! !!!!s FA1H c||j}g}g}g}dx}}|jD]k}|\}\} } | | ksJ|| z }|| z }| dkr||8| dkr||| fV||l|r|rFt t |d||D]} t d| |rMt t |d||D]\} } t d| | fz|ret |jt t |d||D]\} \} } t d| | | fz|r9t |d t |jd t ||z d |d |rt d |dn|rt dt||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.) r2r~r[rrYr,rCrr') rr5notestspassedfailedtotalttotalfr r.rdrthingrs r/ summarizezDocTestRunner.summarizesj ?mG$$&& ! !ALD&1a6666 aKF aKFAvvt$$$$a ay**** a     ? (c'll$9::: $((E%'''' ?c&kk#<=== $*??LE5,u~=>>>>  ; $,    #f++4 5 5 5 KKMMM!' ; ; v1)Q5M9::::  D &*c$-&8&8( C C C &6/< C C C  " %v{ ; ; ; ;  " . ! ! !66***r0c|j}|jD](\}\}}||vr||\}}||z}||z}||f||<)dSr)r~r[)rrdr.rdrrrs r/mergezDocTestRunner.merge7sq M!N0022  LD&1aqyy 4BFFdAdGG  r0)NNr#rNNT)r?rrrrrrrrrrrrrir+rrrrrrr0r/rr{s!66rG$$$$H + + +MMMMMM(L,L,L,\)bj*FGGJJJJD"D"D"D"R4+4+4+4+r     r0rc*eZdZdZdZdZdZdZdS)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. cJt|dddS)z= Convert string to hex-escaped ASCII string. ASCIIr)rCr)rrks r/_toAsciizOutputChecker._toAsciiLs#188G%788'BBBr0cN||}||}||krdS|tzs||fdkrdS||fdkrdS|tzsNtjdtjt zd|}tjdd|}||krdS|tzrVd| }d| }||krdS|tzrt||rdSdS) 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*?$rz(?m)^[^\S\n]+$rhF) rrrrirjriBLANKLINE_MARKERrrrrrrrrrzs r/rzOutputChecker.check_outputRsI mmC  }}T"" $;;444 Dz...tDz///t33 6/BI6F,G,GGd$$D&*B44Cd{{t - - ((399;;''C88DJJLL))Dd{{t  ! tS)) tur0c|ttztzzsdS|tzrdS|ddko|ddkS)NFTr}r<)r r r rrs r/_do_a_fancy_diffzOutputChecker._do_a_fancy_diffsil*+*+, 5  % 4zz$!#; $!(;;r0cp|j}|tzstjdt|}||||r#|d}|d}|tzr1tj ||d}t|dd}d}n|tzr1tj ||d}t|dd}d}nY|tzrEtjtj } t| ||}d }n Jd d |zt#d|zS|r$|r"dt#|dt#|S|rdt#|zS|rdt#|zSdS)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)^[ ]*(?= )Trr<)nNz#unified diff with -expected +actualz-context diff with expected followed by actual)charjunkzndiff with -expected +actualr#zBad diff optionzDifferences (%s): rz Expected: zGot: zExpected: %sGot nothing zExpected nothing Got: %szExpected nothing Got nothing )rrrirjrrrr difflib unified_difflistr context_diffr DifferIS_CHARACTER_JUNKcomparermr) rrrrzrr got_linesdiffkindengines r/rzOutputChecker.output_differences|33 C&*, >44r0N)r?rrrrrrrrr0r/rrDs^CCC <<<~<<<.,5,5,5,5,5r0rceZdZdZdZdZdS)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 c0||_||_||_dSr)r`rr)rr`rrs r/rzDocTestFailure.__init__s  r0c*t|jSrrCr`rs r/__str__zDocTestFailure.__str__49~~r0Nr?rrrrrrr0r/rrs<   r0rceZdZdZdZdZdS)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 c0||_||_||_dSr)r`rrs)rr`rrss r/rzUnexpectedException.__init__s    r0c*t|jSrrrs r/rzUnexpectedException.__str__rr0Nrrr0r/rrs<  !!! r0rc&eZdZdZddZdZdZdS)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 {} NTcxt||||d}|r|j|S)NF)rrr7r)rr`rrrrs r/rzDebugRunner.runWs>   dD,U C C   J     r0c$t|||r)rrs r/rz'DebugRunner.report_unexpected_exception]s!$:::r0c$t|||r)rrs r/rzDebugRunner.report_failure`sT7C000r0r)r?rrrrrrrr0r/rrsSX X t ;;;11111r0rTFc |tjd}tj|st d|||j}t|} |rt||} nt||} | ||||D]} | | |r| t| a nt| 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; )r8r5rzr7rE)rGrHr4r@rArKr?rrrrrrmasterrr'r}r|) rr.r7r5reportrzrEraise_on_errorr8finderrunnerr`s r/rrlsJ y KOOJ ' '  A  ?i!!=>>> |z 7 7 7FIW+FFFwKHHH At5Z HH 4  ~ V v 5 55r0c X|r|stdt|||| pd\} }|tj|}|i}n|}|||d|vrd|d<| rt||} nt||} | | |||d}| ||r| t| a nt | t| j| jS)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. 8Package may only be specified for module-relative paths.rNr?rrr#)rrerrbasenamerrArrrrrrrr'r}r|)r`rbr.rar7r5r rzrEr r6rXtextr r`s r/rrs\d,,+,, ,$Hg$,$799ND( |w)) }  Z   &jIW+FFFwKHHH   dE41 = =D JJt  ~ V v 5 55r0NoNamect|d}t||}||||D]}|||dS)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)r5r7r)r7)rN)rrrr) rdr7r5r.rrzr r r`s r/rrOsl$7E : : :F 7 D D DF At5 1144 4l 333344r0cT|tz|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)rr_unittest_reportflags)r8olds r/rrls5: E))7??? C! Jr0cdeZdZ ddZdZdZdZdZdZd Z d Z d Z d Z e jZd ZdS) DocTestCaser#Nctj|||_||_||_||_||_dSr)unittestTestCaser_dt_optionflags _dt_checker_dt_test _dt_setUp _dt_tearDown)rr`rzsetUptearDownrs r/rzDocTestCase.__init__sG ""4(((*" $r0c|j}|j|_|j||dSdSr)rr7r _dt_globsrrr`s r/r zDocTestCase.setUpsD}** > % NN4  & %r0c|j}|j|||j|j|jdSr)rrr7rrAr#r$s r/r!zDocTestCase.tearDownsZ}   (   d # # #  $.)))))r0c|j}tj}t}|j}|t zs |t z}t||jd} d|_ | ||j d\}}|t_n#|t_wxYw|r:| | |dS)NFrzrr5zF----------------------------------------------------------------------)rr)rrGrr$rrrrrrrrfailureExceptionformat_failurerr)rr`rnewrzr r}r|s r/runTestzDocTestCase.runTests}jjj* o- 1 0 0K;'+'7HHH #FN$jj#))88OHeCJJCJ      M''(;(;CLLNN(K(KLL L M Ms 'B Bc |j}|jd}n d|jz}d|jddd}d|jd|jd|d|d | S) Nzunknown line numberz%srrFailed doctest test for File "rrz )rrrr.rr`)rerrr`rlnames r/r)zDocTestCase.format_failures|} ; *FFDK'F--bcc233999dmmmVVVUUUCCA r0c|t|j|jd}||jd|dS)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' Fr')rN)r rrrrrr!)rr s r/r"zDocTestCase.debugs_D )=%)%5uFFF 4=e 444 r0c|jjSrrr.rs r/rzDocTestCase.id s }!!r0ct|t|urtS|j|jko?|j|jko/|j|jko|j|jko|j|jkSr)rrrrrrrrs r/rzDocTestCase.__eq__ s~ ::T%[[ ( (! !}.5#u'<<5~05 E$6655#44  5r0cPt|j|j|j|jfSr)rrrrrrs r/rzDocTestCase.__hash__& s-T)4>4;L%'(( (r0c|jjd}|ddd|dddS)Nrrr))rr.rr)rr.s r/rzDocTestCase.__repr__* sG}!'',, HHHchhtCRCy&9&9&9&9::r0c d|jjzS)Nz Doctest: r3rs r/shortDescriptionzDocTestCase.shortDescription0 sT]///r0)r#NNN)r?rrrr r!r+r)r"rrrrrOrr9rr0r/rrsAE%%%%!!!***MMM0   FFFP"""555(((;;;nG00000r0rc*eZdZdZdZdZdZeZdS)SkipDocTestCasecJ||_t|ddSr)rLrr)rrLs r/rzSkipDocTestCase.__init__4 s% T4(((((r0c0|ddS)Nz-DocTestSuite will not work with -O2 and above)skipTestrs r/r zSkipDocTestCase.setUp8 s EFFFFFr0cdSrrrs r/ test_skipzSkipDocTestCase.test_skip;  r0c d|jjzS)NzSkipping tests from %s)rLr?rs r/r9z SkipDocTestCase.shortDescription> s'$+*>>>r0N)r?rrrr r@r9rrr0r/r;r;3 sT)))GGG   ???GGGr0r;ceZdZdZdS) _DocTestSuitecdSrr)rrs r/_removeTestAtIndexz _DocTestSuite._removeTestAtIndexF rAr0N)r?rrrFrr0r/rDrDD s#     r0rDc |t}t|}||||}|sGtjjdkr2t }|t||S| t }|D]h}t|j dkr|j s&|j }|dddkr |dd}||_ |t|fi|i|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. Nrr<r#rdrer)rrNrrGr8optimizerDaddTestr;rCr,rr`rr) rLr7rE test_finderrrFsuiter`r`s r/rrJ sJ#oo v & &F   V5Z  H HE SY'!++ of--...  JJLLL OOE44 t}   " " } %H}&&#CRC=$DM k$22'223333 Lr0c eZdZdZdZdZdS) DocFileCasecfd|jjdS)Nrr)rrr.rrs r/rzDocFileCase.id s'xx *0055666r0c|jjSr)rr`rs r/rzDocFileCase.__repr__ s }%%r0c@d|jjd|jjd|S)Nr-r.z ", line 0 )rr.r`)rr/s r/r)zDocFileCase.format_failure s.=%%%t}'='='=ssD r0N)r?rrrrr)rr0r/rMrM sA777&&&r0rMc $|i}n|}|r|stdt||||pd\}}d|vr||d<tj|}|||||d} t| fi|S)Nrrrr#)rrrerrrrrM) rrbrar7r6rXrdocr.r`s r/ DocFileTestrS s } ,,+,, ,tWo'2744IC j 7  D ! !D   c5$a 8 8D t ' 'w ' ''r0ct}|ddr%t|d|d<|D]"}|t |fi|#|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. rbTra)rDr4rNrIrS)pathskwrKrs r/rr s}p OOE  vv&&=)"&&*;*;<<9 // k$--"--.... Lr0cg}t|D]}t|trk||jdd|j}|r?|d|d|dddDz }|d|dddDz }|r.|ddkr"||r |ddk"|r/|ddkr#|d|r |ddk#d |dzS) 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 Nrz # Expected:cg|]}d|zS)z## rrrs r/rz(script_from_examples..= sBBBq57BBBr0r}c,g|]}t|Sr)rrYs r/rz(script_from_examples..@ s0888%Q''888r0rr#) rrrBrrrrrpopr)rkrpiecers r/rr s}tF&&q)) 8 8 eW % % 8 MM%,ss+ , , ,:D C m,,,BBDJJt,<,.U s / / /!$Ar0znot found in testsr#)rNrrrrr)rLr.rFr`testsrcs ` r/r r L sxv & &F OO  ( (E / / / /u / / /D 53444 7D"4>22G Nr0cFt|}t|||dS)z4Debug a single doctest docstring, in argument `src`'N)r debug_script)srcpmr7r_s r/r!r!\ s'"3''G"e$$$$$r0cddl}|r|}ni}|r t|||dS#tt jd|jd}||dt jdYdSxYw|jd d|z||dS)z7Debug a test script. `src` is the script, as a string.r#Nr)T)rr<zexec(%r)) rrrrYrGrsrr interactionr)rbrcr7rps r/raraa sJJJ   C 3 eU # # # # # 3 #,..# $ $ $&&&A GGIII MM$ q 1 2 2 2 2 2 2"":#3UEBBBBBs 4A:B1cpt|}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)rNr rar@)rLr.rcr_s r/r"r"u s:v & &F&&G"fo.....r0c$eZdZdZdZdZdZdS) _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' c||_dS)zval -> _TestClass object with associated value val. >>> t = _TestClass(123) >>> print(t.get()) 123 Nrb)rrbs r/rz_TestClass.__init__ sr0c$|jdz|_|S)zosquare() -> square TestClass's associated value >>> _TestClass(13).square().get() 169 r<rkrs r/squarez_TestClass.square s8q= r0c|jS)z~get() -> return TestClass's associated value. >>> x = _TestClass(-42) >>> print(x.get()) -42 rkrs r/r4z_TestClass.get s xr0N)r?rrrrrmr4rr0r/riri sK  r0riz 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] )rirzbool-int equivalencez blank linesellipsiszwhitespace normalizationc4ddl}|d}|ddddd |d d d tgd |dddd|ddd|}|j}|j}d}|jD]}|t|z}|j r |tz}|D]}| dr|tj |\}}tj d|t#|dd} tj d=t%| ||\} } nt'|d||\} } | rdSdS)Nr#zdoctest runner) descriptionrxz --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)rschoicesrtruz-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))rsrurorz file containing the tests to run)nargsruz.pyr)rbr5rzr))argparseArgumentParser add_argumentr*keys parse_argsror5r fail_fastrr~rrrrGinsertrDrr) ryr6r testfilesr5rrr`dirnamerr}rs r/_testr s OOO  $ $1A $ B BF k,FHHH j 3 8 8 : :BEGGG  mLFHHH c?AAA     D IlGG+//&v.. ~9   U # # K!# h 7 7 GX HOOAw ' ' '8CRC=))A !!W'JJJKHaa"8U-4'KKKKHa  11  1r0r)r<)rf) NNNNTr#NFF)FrNr#ru)FN)F)Tr __docformat____all__r2rr@r>rrrirGrprior$r% collectionsr&r'r*rrrrrrrr r r r r rrrrr;rNrSrermrxrzrrrrrrYrrrrrr Exceptionrrrrrrrrrrrr; TestSuiterDrrMrSrrr r!rar"rirXrr?exitrr0r/rsX%%N& + + + Z 22222222""""""j(:;; .OOO-,-EFF++,CDD**+ABB  z * *6""--.GHH*)*()  , ,#">22 "">22 "">22 //0KLL   , ,   -- !&   >>>>&DDD"""$////             ///b4"%"%"%"%"%CG"%"%"%J , , ,\B$B$B$B$B$B$B$B$HGDGDGDGDGDGDGDGDZd;d;d;d;d;d;d;d;VDDDDDDDDT GGGGGGGGRP5P5P5P5P5P5P5P5dY&)&e1e1e1e1e1-e1e1e1\ 373705f6f6f6f6P(,$dU==??y6y6y6y6v:B:;44446!!!Ha0a0a0a0a0(#a0a0a0Fk"     H&   >>>>@     +   '+D==??((((4CCCRP$P$P$d %%%% CCCC( / / / /********X%%( )Q0 0 f* * * Z z CHUUWWr0