/opt/alt/python39/lib64/python3.9/__pycache__
NameSizeModeActions
abc.cpython-39.opt-1.pyc57880644editdlrm
abc.cpython-39.opt-2.pyc32290644editdlrm
abc.cpython-39.pyc57880644editdlrm
aifc.cpython-39.opt-1.pyc252790644editdlrm
aifc.cpython-39.opt-2.pyc200720644editdlrm
aifc.cpython-39.pyc252790644editdlrm
antigravity.cpython-39.opt-1.pyc8320644editdlrm
antigravity.cpython-39.opt-2.pyc6880644editdlrm
antigravity.cpython-39.pyc8320644editdlrm
argparse.cpython-39.opt-1.pyc635560644editdlrm
argparse.cpython-39.opt-2.pyc541920644editdlrm
argparse.cpython-39.pyc636670644editdlrm
ast.cpython-39.opt-1.pyc523450644editdlrm
ast.cpython-39.opt-2.pyc438000644editdlrm
ast.cpython-39.pyc523960644editdlrm
asynchat.cpython-39.opt-1.pyc68350644editdlrm
asynchat.cpython-39.opt-2.pyc54600644editdlrm
asynchat.cpython-39.pyc68350644editdlrm
asyncore.cpython-39.opt-1.pyc160490644editdlrm
asyncore.cpython-39.opt-2.pyc148450644editdlrm
asyncore.cpython-39.pyc160490644editdlrm
base64.cpython-39.opt-1.pyc163360644editdlrm
base64.cpython-39.opt-2.pyc108160644editdlrm
base64.cpython-39.pyc164680644editdlrm
bdb.cpython-39.opt-1.pyc245530644editdlrm
bdb.cpython-39.opt-2.pyc155160644editdlrm
bdb.cpython-39.pyc245530644editdlrm
binhex.cpython-39.opt-1.pyc129780644editdlrm
binhex.cpython-39.opt-2.pyc124440644editdlrm
binhex.cpython-39.pyc129780644editdlrm
bisect.cpython-39.opt-1.pyc23630644editdlrm
bisect.cpython-39.opt-2.pyc10510644editdlrm
bisect.cpython-39.pyc23630644editdlrm
bz2.cpython-39.opt-1.pyc115580644editdlrm
bz2.cpython-39.opt-2.pyc65420644editdlrm
bz2.cpython-39.pyc115580644editdlrm
calendar.cpython-39.opt-1.pyc270440644editdlrm
calendar.cpython-39.opt-2.pyc224520644editdlrm
calendar.cpython-39.pyc270440644editdlrm
cgi.cpython-39.opt-1.pyc264950644editdlrm
cgi.cpython-39.opt-2.pyc180690644editdlrm
cgi.cpython-39.pyc264950644editdlrm
cgitb.cpython-39.opt-1.pyc101990644editdlrm
cgitb.cpython-39.opt-2.pyc86000644editdlrm
cgitb.cpython-39.pyc101990644editdlrm
chunk.cpython-39.opt-1.pyc48540644editdlrm
chunk.cpython-39.opt-2.pyc27100644editdlrm
chunk.cpython-39.pyc48540644editdlrm
cmd.cpython-39.opt-1.pyc126890644editdlrm
cmd.cpython-39.opt-2.pyc72640644editdlrm
cmd.cpython-39.pyc126890644editdlrm
code.cpython-39.opt-1.pyc99290644editdlrm
code.cpython-39.opt-2.pyc46580644editdlrm
code.cpython-39.pyc99290644editdlrm
codecs.cpython-39.opt-1.pyc339010644editdlrm
codecs.cpython-39.opt-2.pyc183290644editdlrm
codecs.cpython-39.pyc339010644editdlrm
codeop.cpython-39.opt-1.pyc64710644editdlrm
codeop.cpython-39.opt-2.pyc24110644editdlrm
codeop.cpython-39.pyc64710644editdlrm
colorsys.cpython-39.opt-1.pyc32730644editdlrm
colorsys.cpython-39.opt-2.pyc26670644editdlrm
colorsys.cpython-39.pyc32730644editdlrm
compileall.cpython-39.opt-1.pyc126020644editdlrm
compileall.cpython-39.opt-2.pyc93430644editdlrm
compileall.cpython-39.pyc126020644editdlrm
configparser.cpython-39.opt-1.pyc458820644editdlrm
configparser.cpython-39.opt-2.pyc307420644editdlrm
configparser.cpython-39.pyc458820644editdlrm
contextlib.cpython-39.opt-1.pyc195410644editdlrm
contextlib.cpython-39.opt-2.pyc139560644editdlrm
contextlib.cpython-39.pyc195510644editdlrm
contextvars.cpython-39.opt-1.pyc2580644editdlrm
contextvars.cpython-39.opt-2.pyc2580644editdlrm
contextvars.cpython-39.pyc2580644editdlrm
copy.cpython-39.opt-1.pyc69760644editdlrm
copy.cpython-39.opt-2.pyc46730644editdlrm
copy.cpython-39.pyc69760644editdlrm
copyreg.cpython-39.opt-1.pyc44240644editdlrm
copyreg.cpython-39.opt-2.pyc36220644editdlrm
copyreg.cpython-39.pyc44430644editdlrm
cProfile.cpython-39.opt-1.pyc51290644editdlrm
cProfile.cpython-39.opt-2.pyc46680644editdlrm
cProfile.cpython-39.pyc51290644editdlrm
crypt.cpython-39.opt-1.pyc35260644editdlrm
crypt.cpython-39.opt-2.pyc28640644editdlrm
crypt.cpython-39.pyc35260644editdlrm
csv.cpython-39.opt-1.pyc118620644editdlrm
csv.cpython-39.opt-2.pyc98210644editdlrm
csv.cpython-39.pyc118620644editdlrm
dataclasses.cpython-39.opt-1.pyc232300644editdlrm
dataclasses.cpython-39.opt-2.pyc197910644editdlrm
dataclasses.cpython-39.pyc232300644editdlrm
datetime.cpython-39.opt-1.pyc569870644editdlrm
datetime.cpython-39.opt-2.pyc485430644editdlrm
datetime.cpython-39.pyc581280644editdlrm
decimal.cpython-39.opt-1.pyc3720644editdlrm
decimal.cpython-39.opt-2.pyc3720644editdlrm
decimal.cpython-39.pyc3720644editdlrm
difflib.cpython-39.opt-1.pyc585710644editdlrm
difflib.cpython-39.opt-2.pyc250370644editdlrm
difflib.cpython-39.pyc585930644editdlrm
dis.cpython-39.opt-1.pyc158330644editdlrm
dis.cpython-39.opt-2.pyc120260644editdlrm
dis.cpython-39.pyc158330644editdlrm
doctest.cpython-39.opt-1.pyc758450644editdlrm
doctest.cpython-39.opt-2.pyc405390644editdlrm
doctest.cpython-39.pyc760520644editdlrm
enum.cpython-39.opt-1.pyc260330644editdlrm
enum.cpython-39.opt-2.pyc211110644editdlrm
enum.cpython-39.pyc260330644editdlrm
filecmp.cpython-39.opt-1.pyc86350644editdlrm
filecmp.cpython-39.opt-2.pyc60970644editdlrm
filecmp.cpython-39.pyc86350644editdlrm
fileinput.cpython-39.opt-1.pyc138030644editdlrm
fileinput.cpython-39.opt-2.pyc81950644editdlrm
fileinput.cpython-39.pyc138030644editdlrm
fnmatch.cpython-39.opt-1.pyc38830644editdlrm
fnmatch.cpython-39.opt-2.pyc26750644editdlrm
fnmatch.cpython-39.pyc39550644editdlrm
formatter.cpython-39.opt-1.pyc175520644editdlrm
formatter.cpython-39.opt-2.pyc151120644editdlrm
formatter.cpython-39.pyc175520644editdlrm
fractions.cpython-39.opt-1.pyc180620644editdlrm
fractions.cpython-39.opt-2.pyc108620644editdlrm
fractions.cpython-39.pyc180620644editdlrm
ftplib.cpython-39.opt-1.pyc287070644editdlrm
ftplib.cpython-39.opt-2.pyc185630644editdlrm
ftplib.cpython-39.pyc287070644editdlrm
functools.cpython-39.opt-1.pyc287360644editdlrm
functools.cpython-39.opt-2.pyc220150644editdlrm
functools.cpython-39.pyc287360644editdlrm
genericpath.cpython-39.opt-1.pyc45540644editdlrm
genericpath.cpython-39.opt-2.pyc33710644editdlrm
genericpath.cpython-39.pyc45540644editdlrm
getopt.cpython-39.opt-1.pyc62550644editdlrm
getopt.cpython-39.opt-2.pyc37010644editdlrm
getopt.cpython-39.pyc62730644editdlrm
getpass.cpython-39.opt-1.pyc42130644editdlrm
getpass.cpython-39.opt-2.pyc30270644editdlrm
getpass.cpython-39.pyc42130644editdlrm
gettext.cpython-39.opt-1.pyc180860644editdlrm
gettext.cpython-39.opt-2.pyc173950644editdlrm
gettext.cpython-39.pyc180860644editdlrm
glob.cpython-39.opt-1.pyc45180644editdlrm
glob.cpython-39.opt-2.pyc36580644editdlrm
glob.cpython-39.pyc45570644editdlrm
graphlib.cpython-39.opt-1.pyc75350644editdlrm
graphlib.cpython-39.opt-2.pyc40990644editdlrm
graphlib.cpython-39.pyc75810644editdlrm
gzip.cpython-39.opt-1.pyc185070644editdlrm
gzip.cpython-39.opt-2.pyc146400644editdlrm
gzip.cpython-39.pyc185070644editdlrm
hashlib.cpython-39.opt-1.pyc67040644editdlrm
hashlib.cpython-39.opt-2.pyc61360644editdlrm
hashlib.cpython-39.pyc67040644editdlrm
heapq.cpython-39.opt-1.pyc140530644editdlrm
heapq.cpython-39.opt-2.pyc110370644editdlrm
heapq.cpython-39.pyc140530644editdlrm
hmac.cpython-39.opt-1.pyc68130644editdlrm
hmac.cpython-39.opt-2.pyc42960644editdlrm
hmac.cpython-39.pyc68130644editdlrm
imaplib.cpython-39.opt-1.pyc403980644editdlrm
imaplib.cpython-39.opt-2.pyc277150644editdlrm
imaplib.cpython-39.pyc425790644editdlrm
imghdr.cpython-39.opt-1.pyc41530644editdlrm
imghdr.cpython-39.opt-2.pyc38380644editdlrm
imghdr.cpython-39.pyc41530644editdlrm
imp.cpython-39.opt-1.pyc98640644editdlrm
imp.cpython-39.opt-2.pyc74990644editdlrm
imp.cpython-39.pyc98640644editdlrm
inspect.cpython-39.opt-1.pyc812430644editdlrm
inspect.cpython-39.opt-2.pyc561150644editdlrm
inspect.cpython-39.pyc814850644editdlrm
io.cpython-39.opt-1.pyc34210644editdlrm
io.cpython-39.opt-2.pyc19320644editdlrm
io.cpython-39.pyc34210644editdlrm
ipaddress.cpython-39.opt-1.pyc656950644editdlrm
ipaddress.cpython-39.opt-2.pyc397150644editdlrm
ipaddress.cpython-39.pyc656950644editdlrm
keyword.cpython-39.opt-1.pyc9290644editdlrm
keyword.cpython-39.opt-2.pyc5250644editdlrm
keyword.cpython-39.pyc9290644editdlrm
linecache.cpython-39.opt-1.pyc40410644editdlrm
linecache.cpython-39.opt-2.pyc28080644editdlrm
linecache.cpython-39.pyc40410644editdlrm
locale.cpython-39.opt-1.pyc347090644editdlrm
locale.cpython-39.opt-2.pyc300910644editdlrm
locale.cpython-39.pyc347090644editdlrm
lzma.cpython-39.opt-1.pyc121070644editdlrm
lzma.cpython-39.opt-2.pyc59090644editdlrm
lzma.cpython-39.pyc121070644editdlrm
mailbox.cpython-39.opt-1.pyc605590644editdlrm
mailbox.cpython-39.opt-2.pyc539550644editdlrm
mailbox.cpython-39.pyc606130644editdlrm
mailcap.cpython-39.opt-1.pyc72520644editdlrm
mailcap.cpython-39.opt-2.pyc56820644editdlrm
mailcap.cpython-39.pyc72520644editdlrm
mimetypes.cpython-39.opt-1.pyc160280644editdlrm
mimetypes.cpython-39.opt-2.pyc100130644editdlrm
mimetypes.cpython-39.pyc160280644editdlrm
modulefinder.cpython-39.opt-1.pyc160950644editdlrm
modulefinder.cpython-39.opt-2.pyc151860644editdlrm
modulefinder.cpython-39.pyc161410644editdlrm
netrc.cpython-39.opt-1.pyc37960644editdlrm
netrc.cpython-39.opt-2.pyc35580644editdlrm
netrc.cpython-39.pyc37960644editdlrm
nntplib.cpython-39.opt-1.pyc317760644editdlrm
nntplib.cpython-39.opt-2.pyc201760644editdlrm
nntplib.cpython-39.pyc317760644editdlrm
ntpath.cpython-39.opt-1.pyc148250644editdlrm
ntpath.cpython-39.opt-2.pyc127740644editdlrm
ntpath.cpython-39.pyc148250644editdlrm
nturl2path.cpython-39.opt-1.pyc17590644editdlrm
nturl2path.cpython-39.opt-2.pyc13400644editdlrm
nturl2path.cpython-39.pyc17590644editdlrm
numbers.cpython-39.opt-1.pyc123320644editdlrm
numbers.cpython-39.opt-2.pyc83750644editdlrm
numbers.cpython-39.pyc123320644editdlrm
opcode.cpython-39.opt-1.pyc52360644editdlrm
opcode.cpython-39.opt-2.pyc50950644editdlrm
opcode.cpython-39.pyc52360644editdlrm
operator.cpython-39.opt-1.pyc137970644editdlrm
operator.cpython-39.opt-2.pyc114080644editdlrm
operator.cpython-39.pyc137970644editdlrm
optparse.cpython-39.opt-1.pyc479010644editdlrm
optparse.cpython-39.opt-2.pyc355860644editdlrm
optparse.cpython-39.pyc479560644editdlrm
os.cpython-39.opt-1.pyc316430644editdlrm
os.cpython-39.opt-2.pyc194530644editdlrm
os.cpython-39.pyc316590644editdlrm
pathlib.cpython-39.opt-1.pyc435410644editdlrm
pathlib.cpython-39.opt-2.pyc346810644editdlrm
pathlib.cpython-39.pyc435410644editdlrm
pdb.cpython-39.opt-1.pyc475600644editdlrm
pdb.cpython-39.opt-2.pyc334890644editdlrm
pdb.cpython-39.pyc475990644editdlrm
pickle.cpython-39.opt-1.pyc470250644editdlrm
pickle.cpython-39.opt-2.pyc411550644editdlrm
pickle.cpython-39.pyc471110644editdlrm
pickletools.cpython-39.opt-1.pyc663060644editdlrm
pickletools.cpython-39.opt-2.pyc572130644editdlrm
pickletools.cpython-39.pyc671200644editdlrm
pipes.cpython-39.opt-1.pyc78080644editdlrm
pipes.cpython-39.opt-2.pyc49410644editdlrm
pipes.cpython-39.pyc78080644editdlrm
pkgutil.cpython-39.opt-1.pyc185790644editdlrm
pkgutil.cpython-39.opt-2.pyc118800644editdlrm
pkgutil.cpython-39.pyc185790644editdlrm
platform.cpython-39.opt-1.pyc264290644editdlrm
platform.cpython-39.opt-2.pyc183610644editdlrm
platform.cpython-39.pyc264290644editdlrm
plistlib.cpython-39.opt-1.pyc235090644editdlrm
plistlib.cpython-39.opt-2.pyc211500644editdlrm
plistlib.cpython-39.pyc235600644editdlrm
poplib.cpython-39.opt-1.pyc136700644editdlrm
poplib.cpython-39.opt-2.pyc87400644editdlrm
poplib.cpython-39.pyc136700644editdlrm
posixpath.cpython-39.opt-1.pyc106220644editdlrm
posixpath.cpython-39.opt-2.pyc89070644editdlrm
posixpath.cpython-39.pyc106220644editdlrm
pprint.cpython-39.opt-1.pyc168100644editdlrm
pprint.cpython-39.opt-2.pyc146530644editdlrm
pprint.cpython-39.pyc168430644editdlrm
profile.cpython-39.opt-1.pyc142360644editdlrm
profile.cpython-39.opt-2.pyc112580644editdlrm
profile.cpython-39.pyc144240644editdlrm
pstats.cpython-39.opt-1.pyc237650644editdlrm
pstats.cpython-39.opt-2.pyc208560644editdlrm
pstats.cpython-39.pyc237650644editdlrm
pty.cpython-39.opt-1.pyc39690644editdlrm
pty.cpython-39.opt-2.pyc31240644editdlrm
pty.cpython-39.pyc39690644editdlrm
pyclbr.cpython-39.opt-1.pyc104620644editdlrm
pyclbr.cpython-39.opt-2.pyc68610644editdlrm
pyclbr.cpython-39.pyc104620644editdlrm
pydoc.cpython-39.opt-1.pyc854410644editdlrm
pydoc.cpython-39.opt-2.pyc755590644editdlrm
pydoc.cpython-39.pyc854730644editdlrm
py_compile.cpython-39.opt-1.pyc74090644editdlrm
py_compile.cpython-39.opt-2.pyc36710644editdlrm
py_compile.cpython-39.pyc74090644editdlrm
queue.cpython-39.opt-1.pyc108890644editdlrm
queue.cpython-39.opt-2.pyc65390644editdlrm
queue.cpython-39.pyc108890644editdlrm
quopri.cpython-39.opt-1.pyc56160644editdlrm
quopri.cpython-39.opt-2.pyc45800644editdlrm
quopri.cpython-39.pyc57600644editdlrm
random.cpython-39.opt-1.pyc220560644editdlrm
random.cpython-39.opt-2.pyc146090644editdlrm
random.cpython-39.pyc220560644editdlrm
re.cpython-39.opt-1.pyc143750644editdlrm
re.cpython-39.opt-2.pyc60370644editdlrm
re.cpython-39.pyc143750644editdlrm
reprlib.cpython-39.opt-1.pyc53200644editdlrm
reprlib.cpython-39.opt-2.pyc51640644editdlrm
reprlib.cpython-39.pyc53200644editdlrm
rlcompleter.cpython-39.opt-1.pyc58190644editdlrm
rlcompleter.cpython-39.opt-2.pyc31560644editdlrm
rlcompleter.cpython-39.pyc58190644editdlrm
runpy.cpython-39.opt-1.pyc93980644editdlrm
runpy.cpython-39.opt-2.pyc69560644editdlrm
runpy.cpython-39.pyc93980644editdlrm
sched.cpython-39.opt-1.pyc66460644editdlrm
sched.cpython-39.opt-2.pyc36180644editdlrm
sched.cpython-39.pyc66460644editdlrm
secrets.cpython-39.opt-1.pyc21930644editdlrm
secrets.cpython-39.opt-2.pyc11350644editdlrm
secrets.cpython-39.pyc21930644editdlrm
selectors.cpython-39.opt-1.pyc172580644editdlrm
selectors.cpython-39.opt-2.pyc131490644editdlrm
selectors.cpython-39.pyc172580644editdlrm
shelve.cpython-39.opt-1.pyc95570644editdlrm
shelve.cpython-39.opt-2.pyc54060644editdlrm
shelve.cpython-39.pyc95570644editdlrm
shlex.cpython-39.opt-1.pyc77470644editdlrm
shlex.cpython-39.opt-2.pyc71890644editdlrm
shlex.cpython-39.pyc77470644editdlrm
shutil.cpython-39.opt-1.pyc385100644editdlrm
shutil.cpython-39.opt-2.pyc264420644editdlrm
shutil.cpython-39.pyc385100644editdlrm
signal.cpython-39.opt-1.pyc30190644editdlrm
signal.cpython-39.opt-2.pyc27950644editdlrm
signal.cpython-39.pyc30190644editdlrm
site.cpython-39.opt-1.pyc170230644editdlrm
site.cpython-39.opt-2.pyc114870644editdlrm
site.cpython-39.pyc170230644editdlrm
smtpd.cpython-39.opt-1.pyc265370644editdlrm
smtpd.cpython-39.opt-2.pyc239170644editdlrm
smtpd.cpython-39.pyc265370644editdlrm
smtplib.cpython-39.opt-1.pyc358980644editdlrm
smtplib.cpython-39.opt-2.pyc195360644editdlrm
smtplib.cpython-39.pyc359430644editdlrm
sndhdr.cpython-39.opt-1.pyc70060644editdlrm
sndhdr.cpython-39.opt-2.pyc57310644editdlrm
sndhdr.cpython-39.pyc70060644editdlrm
socket.cpython-39.opt-1.pyc289890644editdlrm
socket.cpython-39.opt-2.pyc204500644editdlrm
socket.cpython-39.pyc290130644editdlrm
socketserver.cpython-39.opt-1.pyc255280644editdlrm
socketserver.cpython-39.opt-2.pyc148120644editdlrm
socketserver.cpython-39.pyc255280644editdlrm
sre_compile.cpython-39.opt-1.pyc149720644editdlrm
sre_compile.cpython-39.opt-2.pyc145580644editdlrm
sre_compile.cpython-39.pyc151670644editdlrm
sre_constants.cpython-39.opt-1.pyc63490644editdlrm
sre_constants.cpython-39.opt-2.pyc59240644editdlrm
sre_constants.cpython-39.pyc63490644editdlrm
sre_parse.cpython-39.opt-1.pyc217850644editdlrm
sre_parse.cpython-39.opt-2.pyc217370644editdlrm
sre_parse.cpython-39.pyc218220644editdlrm
ssl.cpython-39.opt-1.pyc450700644editdlrm
ssl.cpython-39.opt-2.pyc340860644editdlrm
ssl.cpython-39.pyc450700644editdlrm
stat.cpython-39.opt-1.pyc43850644editdlrm
stat.cpython-39.opt-2.pyc36020644editdlrm
stat.cpython-39.pyc43850644editdlrm
statistics.cpython-39.opt-1.pyc317970644editdlrm
statistics.cpython-39.opt-2.pyc159240644editdlrm
statistics.cpython-39.pyc319910644editdlrm
string.cpython-39.opt-1.pyc71780644editdlrm
string.cpython-39.opt-2.pyc60720644editdlrm
string.cpython-39.pyc71780644editdlrm
stringprep.cpython-39.opt-1.pyc99590644editdlrm
stringprep.cpython-39.opt-2.pyc97410644editdlrm
stringprep.cpython-39.pyc99990644editdlrm
struct.cpython-39.opt-1.pyc3190644editdlrm
struct.cpython-39.opt-2.pyc3190644editdlrm
struct.cpython-39.pyc3190644editdlrm
subprocess.cpython-39.opt-1.pyc443230644editdlrm
subprocess.cpython-39.opt-2.pyc322850644editdlrm
subprocess.cpython-39.pyc443990644editdlrm
sunau.cpython-39.opt-1.pyc168300644editdlrm
sunau.cpython-39.opt-2.pyc122400644editdlrm
sunau.cpython-39.pyc168300644editdlrm
symbol.cpython-39.opt-1.pyc25920644editdlrm
symbol.cpython-39.opt-2.pyc25160644editdlrm
symbol.cpython-39.pyc25920644editdlrm
symtable.cpython-39.opt-1.pyc111010644editdlrm
symtable.cpython-39.opt-2.pyc103720644editdlrm
symtable.cpython-39.pyc111790644editdlrm
sysconfig.cpython-39.opt-1.pyc160800644editdlrm
sysconfig.cpython-39.opt-2.pyc137020644editdlrm
sysconfig.cpython-39.pyc160800644editdlrm
tabnanny.cpython-39.opt-1.pyc70780644editdlrm
tabnanny.cpython-39.opt-2.pyc61450644editdlrm
tabnanny.cpython-39.pyc70780644editdlrm
tarfile.cpython-39.opt-1.pyc728220644editdlrm
tarfile.cpython-39.opt-2.pyc575640644editdlrm
tarfile.cpython-39.pyc728370644editdlrm
telnetlib.cpython-39.opt-1.pyc183440644editdlrm
telnetlib.cpython-39.opt-2.pyc108420644editdlrm
telnetlib.cpython-39.pyc183440644editdlrm
tempfile.cpython-39.opt-1.pyc236690644editdlrm
tempfile.cpython-39.opt-2.pyc171430644editdlrm
tempfile.cpython-39.pyc236690644editdlrm
textwrap.cpython-39.opt-1.pyc134760644editdlrm
textwrap.cpython-39.opt-2.pyc62670644editdlrm
textwrap.cpython-39.pyc135340644editdlrm
this.cpython-39.opt-1.pyc12720644editdlrm
this.cpython-39.opt-2.pyc12720644editdlrm
this.cpython-39.pyc12720644editdlrm
threading.cpython-39.opt-1.pyc417290644editdlrm
threading.cpython-39.opt-2.pyc245420644editdlrm
threading.cpython-39.pyc421940644editdlrm
timeit.cpython-39.opt-1.pyc117690644editdlrm
timeit.cpython-39.opt-2.pyc59150644editdlrm
timeit.cpython-39.pyc117690644editdlrm
token.cpython-39.opt-1.pyc25090644editdlrm
token.cpython-39.opt-2.pyc24760644editdlrm
token.cpython-39.pyc25090644editdlrm
tokenize.cpython-39.opt-1.pyc171500644editdlrm
tokenize.cpython-39.opt-2.pyc133860644editdlrm
tokenize.cpython-39.pyc171780644editdlrm
trace.cpython-39.opt-1.pyc197720644editdlrm
trace.cpython-39.opt-2.pyc167570644editdlrm
trace.cpython-39.pyc197720644editdlrm
traceback.cpython-39.opt-1.pyc204530644editdlrm
traceback.cpython-39.opt-2.pyc115000644editdlrm
traceback.cpython-39.pyc204530644editdlrm
tracemalloc.cpython-39.opt-1.pyc179480644editdlrm
tracemalloc.cpython-39.opt-2.pyc165350644editdlrm
tracemalloc.cpython-39.pyc179480644editdlrm
tty.cpython-39.opt-1.pyc10910644editdlrm
tty.cpython-39.opt-2.pyc9820644editdlrm
tty.cpython-39.pyc10910644editdlrm
types.cpython-39.opt-1.pyc92490644editdlrm
types.cpython-39.opt-2.pyc80270644editdlrm
types.cpython-39.pyc92490644editdlrm
typing.cpython-39.opt-1.pyc718180644editdlrm
typing.cpython-39.opt-2.pyc505700644editdlrm
typing.cpython-39.pyc719480644editdlrm
uu.cpython-39.opt-1.pyc38600644editdlrm
uu.cpython-39.opt-2.pyc36160644editdlrm
uu.cpython-39.pyc38600644editdlrm
uuid.cpython-39.opt-1.pyc224100644editdlrm
uuid.cpython-39.opt-2.pyc146970644editdlrm
uuid.cpython-39.pyc225230644editdlrm
warnings.cpython-39.opt-1.pyc131790644editdlrm
warnings.cpython-39.opt-2.pyc109040644editdlrm
warnings.cpython-39.pyc136180644editdlrm
wave.cpython-39.opt-1.pyc178570644editdlrm
wave.cpython-39.opt-2.pyc118650644editdlrm
wave.cpython-39.pyc178860644editdlrm
weakref.cpython-39.opt-1.pyc202840644editdlrm
weakref.cpython-39.opt-2.pyc169990644editdlrm
weakref.cpython-39.pyc202980644editdlrm
webbrowser.cpython-39.opt-1.pyc171300644editdlrm
webbrowser.cpython-39.opt-2.pyc147200644editdlrm
webbrowser.cpython-39.pyc171470644editdlrm
xdrlib.cpython-39.opt-1.pyc82560644editdlrm
xdrlib.cpython-39.opt-2.pyc77710644editdlrm
xdrlib.cpython-39.pyc82560644editdlrm
zipapp.cpython-39.opt-1.pyc59980644editdlrm
zipapp.cpython-39.opt-2.pyc48220644editdlrm
zipapp.cpython-39.pyc59980644editdlrm
zipfile.cpython-39.opt-1.pyc595630644editdlrm
zipfile.cpython-39.opt-2.pyc505750644editdlrm
zipfile.cpython-39.pyc595840644editdlrm
zipimport.cpython-39.opt-1.pyc171720644editdlrm
zipimport.cpython-39.opt-2.pyc136540644editdlrm
zipimport.cpython-39.pyc172500644editdlrm
_aix_support.cpython-39.opt-1.pyc30590644editdlrm
_aix_support.cpython-39.opt-2.pyc17040644editdlrm
_aix_support.cpython-39.pyc30590644editdlrm
_bootlocale.cpython-39.opt-1.pyc12300644editdlrm
_bootlocale.cpython-39.opt-2.pyc10050644editdlrm
_bootlocale.cpython-39.pyc12400644editdlrm
_bootsubprocess.cpython-39.opt-1.pyc22580644editdlrm
_bootsubprocess.cpython-39.opt-2.pyc20290644editdlrm
_bootsubprocess.cpython-39.pyc22580644editdlrm
_collections_abc.cpython-39.opt-1.pyc317440644editdlrm
_collections_abc.cpython-39.opt-2.pyc262540644editdlrm
_collections_abc.cpython-39.pyc317440644editdlrm
_compat_pickle.cpython-39.opt-1.pyc54480644editdlrm
_compat_pickle.cpython-39.opt-2.pyc54480644editdlrm
_compat_pickle.cpython-39.pyc55010644editdlrm
_compression.cpython-39.opt-1.pyc42110644editdlrm
_compression.cpython-39.opt-2.pyc39970644editdlrm
_compression.cpython-39.pyc42110644editdlrm
_markupbase.cpython-39.opt-1.pyc76390644editdlrm
_markupbase.cpython-39.opt-2.pyc72610644editdlrm
_markupbase.cpython-39.pyc77900644editdlrm
_osx_support.cpython-39.opt-1.pyc115950644editdlrm
_osx_support.cpython-39.opt-2.pyc89050644editdlrm
_osx_support.cpython-39.pyc115950644editdlrm
_pydecimal.cpython-39.opt-1.pyc1606260644editdlrm
_pydecimal.cpython-39.opt-2.pyc790090644editdlrm
_pydecimal.cpython-39.pyc1606260644editdlrm
_pyio.cpython-39.opt-1.pyc743800644editdlrm
_pyio.cpython-39.opt-2.pyc515830644editdlrm
_pyio.cpython-39.pyc744000644editdlrm
_py_abc.cpython-39.opt-1.pyc46470644editdlrm
_py_abc.cpython-39.opt-2.pyc34340644editdlrm
_py_abc.cpython-39.pyc46690644editdlrm
_sitebuiltins.cpython-39.opt-1.pyc35140644editdlrm
_sitebuiltins.cpython-39.opt-2.pyc29900644editdlrm
_sitebuiltins.cpython-39.pyc35140644editdlrm
_strptime.cpython-39.opt-1.pyc160280644editdlrm
_strptime.cpython-39.opt-2.pyc123000644editdlrm
_strptime.cpython-39.pyc160280644editdlrm
_sysconfigdata_d_linux_x86_64-linux-gnu.cpython-39.opt-1.pyc269610644editdlrm
_sysconfigdata_d_linux_x86_64-linux-gnu.cpython-39.opt-2.pyc269610644editdlrm
_sysconfigdata_d_linux_x86_64-linux-gnu.cpython-39.pyc269610644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.opt-1.pyc270070644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.opt-2.pyc270070644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.pyc270070644editdlrm
_threading_local.cpython-39.opt-1.pyc65190644editdlrm
_threading_local.cpython-39.opt-2.pyc31990644editdlrm
_threading_local.cpython-39.pyc65190644editdlrm
_weakrefset.cpython-39.opt-1.pyc77370644editdlrm
_weakrefset.cpython-39.opt-2.pyc77370644editdlrm
_weakrefset.cpython-39.pyc77370644editdlrm
__future__.cpython-39.opt-1.pyc41390644editdlrm
__future__.cpython-39.opt-2.pyc21670644editdlrm
__future__.cpython-39.pyc41390644editdlrm
__phello__.foo.cpython-39.opt-1.pyc1420644editdlrm
__phello__.foo.cpython-39.opt-2.pyc1420644editdlrm
__phello__.foo.cpython-39.pyc1420644editdlrm
Edit: /opt/alt/python39/lib64/python3.9/__pycache__/doctest.cpython-39.pyc (76052B)
a XC?hx @s6dZdZgdZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl mZddlmZeddZiZd d Zed Zed Zed ZedZedZedZeeBeBeBeBeBZedZedZedZedZedZeeBeBeBeBZ dZ!dZ"ddZ#drddZ$ddZ%dd Z&dsd"d#Z'd$d%Z(Gd&d'd'eZ)d(d)Z*d*d+Z+d,d-Z,Gd.d/d/ej-Z.d0d1Z/Gd2d3d3Z0Gd4d5d5Z1Gd6d7d7Z2Gd8d9d9Z3Gd:d;d;Z4Gdd?d?e6Z7Gd@dAdAe6Z8GdBdCdCe4Z9da:dtdFdGZ;dDdddddDdddEe2df dHdIZdMdNZ?GdOdPdPe j@ZAGdQdRdReAZBGdSdTdTe jCZDdvdUdVZEGdWdXdXeAZFdDdde2dfdYdZZGd[d\ZHd]d^ZId_d`ZJdwdadbZKdxdcddZLdydedfZMGdgdhdhZNeNdidjdkdldmdnZOdodpZPeQdqkr2e RePdS)zaModule 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)StringIO) namedtuple TestResultszfailed attemptedcCst|dtt>S)N)OPTIONFLAGS_BY_NAME setdefaultlennamer,,/opt/alt/python39/lib64/python3.9/doctest.pyrsrrrrrrrr r r r rz z...cCs8d}tjD](}||d}|tt|ur ||jO}q |S)z Return the compiler-flags associated with the future features that have been imported into the given namespace (globs). r"N) __future__Zall_feature_namesgetgetattrZ compiler_flag)globsflagsZfnameZfeaturer,r,r-_extract_future_flagss    r3cCsVt|r|St|tr,t|ttdgS|durJtjt |j dSt ddS)a Return the module specified by `module`. In particular: - If `module` is a module, then return module. - If `module` is a string, then import and return the module with that name. - If `module` is None, then return the calling module. The calling module is assumed to be the module of the stack frame at the given depth in the call stack. *N__name__z"Expected a module, string, or None) inspectismodule isinstancestr __import__globalslocalssysmodules _getframe f_globals TypeError)moduleZdepthr,r,r-_normalize_modules  rDcCsdD]}||d}q|S)N)z   )replace)datanewliner,r,r-_newline_convertsrJcCs|rVt|d}t||}t|dddurVt|jdrV|j|}||}t||fSt||d}| |fWdS1s0YdS)N __loader__get_data)encoding) rD_module_relative_pathr0hasattrrLrMdecoderJopenread)filenamepackagemodule_relativerNZ file_contentsfr,r,r-_load_testfiles      rXcCstd|d|S)z~ Add the given number of space characters to the beginning of every non-blank line in `s`, and return the result. z (?m)^(?!$) )resub)sindentr,r,r-_indentsr_cCs*t}|\}}}tj||||d|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_infoZexcoutexc_typeZexc_valZexc_tbr,r,r-_exception_tracebacks rfc@seZdZddZdddZdS) _SpoofOutcCs$t|}|r |ds |d7}|SNrF)r#rcendswith)selfresultr,r,r-rcs z_SpoofOut.getvalueNcCs||t|dSN)seekr#truncate)rjsizer,r,r-rn s z_SpoofOut.truncate)N)r6 __module__ __qualname__rcrnr,r,r,r-rgs rgcCst|vr||kS|t}t|dks*Jdt|}}|d}|rb||r^t|}|d=ndS|d}|r||r|t|8}|d=ndS||krdS|D],}||||}|dkrdS|t|7}qdS)z_ Essentially the only subtle case: >>> _ellipsis_match('aa...aa', 'aaa') False r4r"FT)ELLIPSIS_MARKERsplitr) startswithrifind)wantgotZwsstartposendposwr,r,r-_ellipsis_matchs2    r|cCs|}|rd|SdSdS)z)Return a commented form of the given linez# #N)rstrip)liner,r,r- _comment_line?srcCshdt|}}|d}|dkr$|}|dd|}|dkr>|}|dd|}|dkr\|d}|||S)Nr"rF:.r&)r)rvrfind)msgstartendir,r,r-_strip_exception_detailsGs  rc@s2eZdZdZddZd ddZddZd d ZdS) _OutputRedirectingPdbz A specialized version of the python debugger that redirects stdout to a given stream when interacting with the user. Stdout is *not* redirected when traced code is executed. cCs(||_d|_tjj||ddd|_dS)NFT)stdoutnosigintr&)_OutputRedirectingPdb__out$_OutputRedirectingPdb__debugger_usedpdbPdb__init__Z use_rawinput)rjoutr,r,r-rgsz_OutputRedirectingPdb.__init__NcCs*d|_|durtj}tj||dS)NT)rr>r@f_backrr set_trace)rjframer,r,r-ros z_OutputRedirectingPdb.set_tracecCs|jrtj|dSrl)rrr set_continuerjr,r,r-rusz"_OutputRedirectingPdb.set_continuecGs8tj}|jt_ztjj|g|RW|t_S|t_0dSrl)r>rrrrtrace_dispatch)rjargs save_stdoutr,r,r-r{sz$_OutputRedirectingPdb.trace_dispatch)N)r6rprq__doc__rrrrr,r,r,r-ras  rcCst|std||dr(tdtjj|d}t |drXtj|j d}n|j dkrt t jdkrt jddkrtjt jdd}qtj}nFt |dr|jD]&}tj||}tj|r|Sqtd |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__))r7r8rBru ValueErrorospathjoinrtrPrr6r)r>argvcurdirrexists)rCZ test_pathZbasedirZ directoryfullpathr,r,r-rOs(         rOc@s*eZdZdZd ddZddZdd ZdS) ran A single doctest example, consisting of source code and expected output. `Example` defines the following attributes: - source: A single Python statement, always ending with a newline. The constructor adds a newline if needed. - want: The expected output from running the source code (either from stdout, or a traceback in case of exception). `want` ends with a newline unless it's empty, in which case it's an empty string. The constructor adds a newline if needed. - exc_msg: The exception message generated by the example, if the example is expected to generate an exception; or `None` if it is not expected to generate an exception. This exception message is compared against the return value of `traceback.format_exception_only()`. `exc_msg` ends with a newline unless it's `None`. The constructor adds a newline if needed. - lineno: The line number within the DocTest string containing this Example where the Example begins. This line number is zero-based, with respect to the beginning of the DocTest. - indent: The example's indentation in the DocTest string. I.e., the number of space characters that precede the example's first prompt. - options: A dictionary mapping from option flags to True or False, which is used to override default options for this example. Any option flags not contained in this dictionary are left at their default value (as specified by the DocTestRunner's optionflags). By default, no options are set. Nr"cCsv|ds|d7}|r(|ds(|d7}|durB|dsB|d7}||_||_||_||_|durfi}||_||_dSrh)risourcerwlinenor^optionsexc_msg)rjrrwrrr^rr,r,r-rs  zExample.__init__cCs\t|t|urtS|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkSrl)typeNotImplementedrrwrr^rrrjotherr,r,r-__eq__s      zExample.__eq__cCst|j|j|j|j|jfSrl)hashrrwrr^rrr,r,r-__hash__szExample.__hash__)Nr"r"N)r6rprqrrrrr,r,r,r-rs "  rc@s8eZdZdZddZddZddZdd Zd d Zd S) rae A collection of doctest examples that should be run in a single namespace. Each `DocTest` defines the following attributes: - examples: the list of examples. - globs: The namespace (aka globals) that the examples should be run in. - name: A name identifying the DocTest (typically, the name of the object whose docstring this DocTest was extracted from). - filename: The name of the file that this DocTest was extracted from, or `None` if the filename is unknown. - lineno: The line number within filename where this DocTest begins, or `None` if the line number is unavailable. This line number is zero-based, with respect to the beginning of the file. - docstring: The string that the examples were extracted from, or `None` if the string is unavailable. cCs>t|trJd||_||_||_||_||_||_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) r9r:examples docstringcopyr1r+rTr)rjrr1r+rTrrr,r,r-rs  zDocTest.__init__cCsRt|jdkrd}n"t|jdkr(d}ndt|j}d|jj|j|j|j|fS)Nr"z no examplesr&z 1 examplez %d examplesz<%s %s from %s:%s (%s)>)r)r __class__r6r+rTr)rjrr,r,r-__repr__szDocTest.__repr__cCs\t|t|urtS|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkoZ|j|jkSrl)rrrrr1r+rTrrr,r,r-r)s      zDocTest.__eq__cCst|j|j|j|jfSrl)rrr+rTrrr,r,r-r4szDocTest.__hash__cCs:t|tstS|j|j|jt|f|j|j|jt|fkSrl)r9rrr+rTridrr,r,r-__lt__8s  zDocTest.__lt__N) r6rprqrrrrrrr,r,r,r-rs   rc@seZdZdZedejejBZedejejBej BZ edj Z dddZ dd Zdd d Zd d ZedejZddZedejZddZddZddZdS)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|}||dkr8dfdd|dD}g}d\}}|j|D]}||||||d||7}| |||\}}} } | |s|t || | |t | d|d||d||7}|}qP|||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"rFcsg|]}|dqSrlr,.0lZ min_indentr,r- z'DocTestParser.parse..r"r"r^)rr^rN) expandtabs _min_indentrrt _EXAMPLE_REfinditerappendrcount_parse_example_IS_BLANK_OR_COMMENTrr)groupr) rjstringr+outputZcharnormrrrwrr,rr-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)rjrr1r+rTrr,r,r- get_doctests zDocTestParser.get_doctestcCsdd|||DS)a Extract all doctest examples from the given string, and return them as a list of `Example` objects. Line numbers are 0-based, because it's most common in doctests that nothing interesting appears on the same line as opening triple-quote, and so the first interesting line is called "line 1" then. The optional argument `name` is a name identifying this string, and is only used for error messages. cSsg|]}t|tr|qSr,)r9r)rxr,r,r-rs z.DocTestParser.get_examples..)r)rjrr+r,r,r-rs zDocTestParser.get_examplesc s t|d|dd}||||||dddd||dfdd |D}|d }|d}t|dkrtd |d r|d =||d||t|dfd 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^rrFr&NrZrcsg|]}|ddqS)rYNr,)rZslr^r,r-rrz0DocTestParser._parse_example..rwz *$rrcsg|]}|dqSrlr,)rZwlrr,r-rrr) r)rrt_check_prompt_blank _check_prefixrr[match _EXCEPTION_RE _find_options) rjrr+r source_linesrrw want_linesrrr,rr-rs&       zDocTestParser._parse_examplez#\s*doctest:\s*([^\n\'"]*)$c Csi}|j|D]v}|ddd}|D]V}|ddvsN|ddtvrdtd|d||ft|dd}|ddk||<q.q|r||rtd |||f|S) a Return a dictionary containing option overrides extracted from option directives in the given source string. `name` is the string's name, and `lineno` is the line number where the example starts; both are used for error messages. r&,rZr"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_RErrrGrtr'rr) rjrr+rrrZoption_stringsoptionflagr,r,r-rs"  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))rr^r,r,r-r rz-DocTestParser._min_indent..r"N) _INDENT_REfindallr)min)rjr]indentsr,r,r-rs zDocTestParser._min_indentc Cs^t|D]P\}}t||dkr||ddkrtd||d||||d|fqdS)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. rYrKrZz8line %r of the docstring for %s lacks blank after %s: %rr&N) enumerater)r)rjlinesr^r+rrrr,r,r-rs  z!DocTestParser._check_prompt_blankcCs>t|D]0\}}|r||std||d||fqdS)z Check that every line in the given list starts with the given prefix; if any line does not, then raise a ValueError. zGline %r of the docstring for %s has inconsistent leading whitespace: %rr&N)rrur)rjrprefixr+rrrr,r,r-rs zDocTestParser._check_prefixN)r)r)r6rprqrr[compile MULTILINEVERBOSErDOTALLrrrrrrrrrrrrrr,r,r,r-rCs(    ' 3rc@sNeZdZdZdeddfddZdddZd d Zd d Zd dZ ddZ dS)ra< A class used to extract the DocTests that are relevant to a given object, from its docstring and the docstrings of its contained objects. Doctests can currently be extracted from the following object types: modules, functions, classes, methods, staticmethods, classmethods, and properties. FTcCs||_||_||_||_dS)at Create a new doctest finder. The optional argument `parser` specifies a class or function that should be used to create new DocTest objects (or objects that implement the same interface as DocTest). The signature for this factory function should match the signature of the DocTest constructor. If the optional argument `recurse` is false, then `find` will only examine the given object, and not any contained objects. If the optional argument `exclude_empty` is false, then `find` will include tests for objects with empty docstrings. N)_parser_verbose_recurse_exclude_empty)rjverboseparserrecurse exclude_emptyr,r,r-r7szDocTestFinder.__init__Nc CsL|dur.t|dd}|dur.tdt|f|durr)r0rrr7 getmoduleZ getsourcefilerBZgetfile linecachegetlines__dict__rupdate_findsort) rjobjr+rCr1 extraglobsr`rtestsr,r,r-rvMsJ$          zDocTestFinder.findcCs|dur dSt|dur(|t|uSt|r>|j|juSt|r|t|dr\|jj}nt|drn|j}ndS|j |kSt |r|j |jkSt|dr|j |jkSt |t rdSt ddS)zY Return true if the given object is defined in the given module. NT __objclass__rpz"object must be a class or function)r7r isfunctionr __globals__ZismethoddescriptorrPrrpr6isclassr9propertyr)rjrCobjectZobj_modr,r,r- _from_modules(            zDocTestFinder._from_modulec Cs|jrtd|t||vr"dSd|t|<||||||}|durR||t|r|jr|j D]P\} } d|| f} t t | st | rl| || rl||| | ||||qlt|rn|jrnt|di D]\} } t| tstdt| ft | sJt | sJt| sJt| tsJtdt| fd|| f} ||| | ||||qt |r|jr|j D]t\} } t| ttfr| j} t | st | st| tr| || rd|| f} ||| | ||||qdS) zm Find tests for the given object and any contained objects, and add them to `tests`. zFinding tests in %sNr&z%s.%s__test__z5DocTestFinder.find: __test__ keys must be strings: %rz`DocTestFinder.find: __test__ values must be strings, functions, methods, classes, or modules: %rz%s.__test__.%s)rprintr _get_testrr7r8rritemsZ isroutineZunwraprrrr0r9r:rr staticmethod classmethod__func__r) rjrrr+rCrr1seentestZvalnamevalr,r,r-rsd          zDocTestFinder._findc Cst|tr|}nHz,|jdur"d}n|j}t|ts:t|}WnttfyVd}Yn0|||}|jrr|srdS|durd}n.t|ddp|j}|dddkr|dd}|j |||||S)zs Return a DocTest for the given object, if it defines a docstring; otherwise, return None. Nrr.pycrr) r9r:rrBAttributeError _find_linenorr0r6rr) rjrr+rCr1rrrrTr,r,r-r s*         zDocTestFinder._get_testcCsd}t|rd}t|rb|dur(dStdt|dd}t|D]\}}||rF|}qbqFt|rr|j }t |r|j }t |r|j }t|r|j}t|rt|ddd}|dur |dur|dStd}t|t|D]}|||r|SqdS) 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\br6-co_firstlinenor&z(^|.*:)\s*\w*("|\'))r7r8rr[rr0rrZismethodr r__code__Z istracebacktb_frameZisframef_codeZiscoderanger))rjrrrZpatrrr,r,r-r2s6        zDocTestFinder._find_lineno)NNNN) r6rprqrrrrvrrrrr,r,r,r-r.s  f=&rc@seZdZdZdZdddZddZd d Zd d Zd dZ ddZ ddZ ddZ e dZd ddZd!ddZd"ddZddZdS)#ra3 A class used to run DocTest test cases, and accumulate statistics. The `run` method is used to process a single DocTest case. It returns a tuple `(f, t)`, where `t` is the number of test cases tried, and `f` is the number of test cases that failed. >>> tests = DocTestFinder().find(_TestClass) >>> runner = DocTestRunner(verbose=False) >>> tests.sort(key = lambda test: test.name) >>> for test in tests: ... print(test.name, '->', runner.run(test)) _TestClass -> TestResults(failed=0, attempted=2) _TestClass.__init__ -> TestResults(failed=0, attempted=2) _TestClass.get -> TestResults(failed=0, attempted=2) _TestClass.square -> TestResults(failed=0, attempted=1) The `summarize` method prints a summary of all the test cases that have been run by the runner, and returns an aggregated `(f, t)` tuple: >>> runner.summarize(verbose=1) 4 items passed all tests: 2 tests in _TestClass 2 tests in _TestClass.__init__ 2 tests in _TestClass.get 1 tests in _TestClass.square 7 tests in 4 items. 7 passed and 0 failed. Test passed. TestResults(failed=0, attempted=7) The aggregated number of tried examples and failed examples is also available via the `tries` and `failures` attributes: >>> runner.tries 7 >>> runner.failures 0 The comparison between expected outputs and actual outputs is done by an `OutputChecker`. This comparison may be customized with a number of option flags; see the documentation for `testmod` for more information. If the option flags are insufficient, then the comparison may also be customized by passing a subclass of `OutputChecker` to the constructor. The test runner's display output can be controlled in two ways. First, an output function (`out) can be passed to `TestRunner.run`; this function will be called with strings that should be displayed. It defaults to `sys.stdout.write`. If capturing the output is not sufficient, then the display output can be also customized by subclassing DocTestRunner, and overriding the methods `report_start`, `report_success`, `report_unexpected_exception`, and `report_failure`. zF**********************************************************************Nr"cCsN|pt|_|durdtjv}||_||_||_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_checkerr>rr optionflagsoriginal_optionflagstriesfailures_name2ftrg_fakeout)rjcheckerrrr,r,r-rs  zDocTestRunner.__init__cCsH|jrD|jr.|dt|jdt|jn|dt|jddS)z Report that the test runner is about to process the given example. (Only displays a message if verbose=True) zTrying: z Expecting: zExpecting nothing N)rrwr_r)rjrr exampler,r,r- report_startszDocTestRunner.report_startcCs|jr|ddS)zt Report that the given example ran successfully. (Only displays a message if verbose=True) zok N)rrjrr r!rxr,r,r-report_successszDocTestRunner.report_successcCs&|||||j|||jdS)z7 Report that the given example failed. N)_failure_headerroutput_differencerr#r,r,r-report_failures zDocTestRunner.report_failurecCs$||||dtt|dS)zO Report that the given example raised an unexpected exception. zException raised: N)r%r_rfrjrr r!rdr,r,r-report_unexpected_exceptions   z)DocTestRunner.report_unexpected_exceptioncCs|jg}|jrR|jdur4|jdur4|j|jd}nd}|d|j||jfn|d|jd|jf|d|j}|t|d|S)Nr&?zFile "%s", line %s, in %szLine %s, in %szFailed example:rF)DIVIDERrTrrr+rr_r)rjr r!rrrr,r,r-r%s  zDocTestRunner._failure_headerc Csd}}|j}td\}}} |jj} t|jD]F\} } |jt@oH|dk} ||_| jr| jD],\}}|r||j|O_q`|j|M_q`|jt @rq.|d7}| s| ||| d|j | f}z,t t | j|d|d|j|jd}Wn2tyYnt}|jYn0|j}|jd|}|dur^| | j||jr|}n|tj|ddd }| s|t|7}| jdur| }nB| | j||jr|}n*|jt@r| t| jt||jr|}||ur| sb|||| |nf||ur&| s| ||| ||d7}n<|| urP| sF|!||| ||d7}nd sbJd |f|r.|jt"@r.qxq.||_|#|||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"rKr&zZsingleTNr4rrFzunknown outcome)%rrr check_outputrrr rrrr"r+execrrr1debuggerrKeyboardInterruptr>rdrrcrnrwraformat_exception_onlyrfrrrr$r'r)r_DocTestRunner__record_outcomer%)rjr  compileflagsrrrrSUCCESSFAILUREZBOOMZcheck examplenumr!quietZ optionflagr rTZ exceptionrxZoutcomerr,r,r-Z__runs                  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. rN)rr/r+rr)rjr rWtf2t2r,r,r-Z__record_outcomezszDocTestRunner.__record_outcomez..+)\[(?P\d+)\]>$cCsV|j|}|rF|d|jjkrF|jjt|d}|jjddS| ||SdS)Nr+r5Tkeepends) %_DocTestRunner__LINECACHE_FILENAME_RErrr r+rintr splitlinessave_linecache_getlines)rjrTmodule_globalsrr!r,r,r-Z__patched_linecache_getliness  z*DocTestRunner.__patched_linecache_getlinesTc sD||_|durt|j}tj|durVjdus@dkrHj}nfdd}|jt_t }t j }t |_ |j |j j t _ tj|_|jt_tj}tjt_zR||||Wt_|t _ t||jt_|t_|r|jddl}d|_SnDt_|t _ t||jt_|t_|r>|jddl}d|_0dS)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-8cs t|d}|dS)Nbackslashreplace)r:encodewrite)r]rNrr,r-rszDocTestRunner.run..outr")r r3r1r>rrNlowerrDrgettracerrrr.resetrrr?*_DocTestRunner__patched_linecache_getlines displayhook__displayhook___DocTestRunner__runsettraceclearbuiltins_) rjr r2r clear_globsZ save_traceZsave_set_traceZsave_displayhookrOr,rEr-runsb        zDocTestRunner.runc Cs|dur|j}g}g}g}d}}|jD]b}|\}\} } | | ksHJ|| 7}|| 7}| dkrl||q,| dkr||| fq,||q,|r|rtt|d||D]} td| q|rtt|d||D]\} } td| | fq|rFt|jtt|d||D] \} \} } td| | | fq$|rrt|d t|jd t||d |d |rtd |dn|rtdt||S)a Print a summary of all the test cases that have been run by this DocTestRunner, and return a tuple `(f, t)`, where `f` is the total number of failed examples, and `t` is the total number of tried examples. The optional `verbose` argument controls how detailed the summary is. If the verbosity is not specified, then the DocTestRunner's verbosity is used. Nr"zitems had no tests:z zitems passed all tests:z %3d tests in %szitems had failures:z %3d of %3d in %sztests inzitems.z passed andzfailed.z***Test Failed***z failures.z Test passed.) rrrrrr)rr+r%) rjrZnotestsZpassedZfailedZtotaltZtotalfrr+rWr7thingrr,r,r- summarizesR        zDocTestRunner.summarizecCsR|j}|jD]<\}\}}||vr@||\}}||}||}||f||<qdSrl)rr)rjrdr+rWr7r8r9r,r,r-merges zDocTestRunner.merge)NNr")N)NNT)N)r6rprqrr+rr"r$r'r)r%rLr1r[rr<rIrRrTrVr,r,r,r-rfs9 $ }   I 9rc@s0eZdZdZddZddZddZdd Zd S) ra_ A class used to check the whether the actual output from a doctest example matches the expected output. `OutputChecker` defines two methods: `check_output`, which compares a given pair of outputs, and returns true if they match; and `output_difference`, which returns a string describing the differences between two outputs. cCst|dddS)z= Convert string to hex-escaped ASCII string. ASCIIrB)r:rC)rjr]r,r,r-_toAscii&szOutputChecker._toAsciicCs||}||}||kr dS|t@sH||fdkr8dS||fdkrHdS|t@stdttd|}tdd|}||krdS|t@rd| }d| }||krdS|t @rt ||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]+$rZF) rXrrr[r\escapeBLANKLINE_MARKERrrrtrr|rjrwrxrr,r,r-r,,s2     zOutputChecker.check_outputcCs<|ttBtB@sdS|t@r dS|ddko:|ddkS)NFTrFr4)r r r rr[r,r,r-_do_a_fancy_diffks zOutputChecker._do_a_fancy_diffc Cs8|j}|t@stdt|}||||r|jdd}|jdd}|t@rptj ||dd}t |dd}d}nf|t @rtj ||dd}t |dd}d}n8|t @rtjtjd } t | ||}d }n d sJd 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)^[ ]*(?= )Tr:r4)nNz#unified diff with -expected +actualz-context diff with expected followed by actual)Zcharjunkzndiff with -expected +actualr"zBad diff optionzDifferences (%s): rzExpected: %sGot: %szExpected: %sGot nothing zExpected nothing Got: %szExpected nothing Got nothing )rwrr[r\rZr\r>r difflibZ unified_difflistr Z context_diffr ZDifferZIS_CHARACTER_JUNKZcomparer_r) rjr!rxrrwrZ got_linesZdiffkindZenginer,r,r-r&s6      zOutputChecker.output_differenceN)r6rprqrrXr,r\r&r,r,r,r-rs ?rc@s eZdZdZddZddZdS)rzA DocTest example has failed in debugging mode. The exception instance has variables: - test: the DocTest object being run - example: the Example object that failed - got: the actual output cCs||_||_||_dSrl)r r!rx)rjr r!rxr,r,r-rszDocTestFailure.__init__cCs t|jSrlr:r rr,r,r-__str__szDocTestFailure.__str__Nr6rprqrrrbr,r,r,r-rs rc@s eZdZdZddZddZdS)rzA DocTest example has encountered an unexpected exception The exception instance has variables: - test: the DocTest object being run - example: the Example object that failed - exc_info: the exception info cCs||_||_||_dSrl)r r!rd)rjr r!rdr,r,r-rszUnexpectedException.__init__cCs t|jSrlrarr,r,r-rbszUnexpectedException.__str__Nrcr,r,r,r-rs rc@s*eZdZdZd ddZddZdd ZdS) ra Run doc tests but raise an exception as soon as there is a failure. If an unexpected exception occurs, an UnexpectedException is raised. It contains the test, the example, and the original exception: >>> runner = DebugRunner(verbose=False) >>> test = DocTestParser().get_doctest('>>> raise KeyError\n42', ... {}, 'foo', 'foo.py', 0) >>> try: ... runner.run(test) ... except UnexpectedException as f: ... failure = f >>> failure.test is test True >>> failure.example.want '42\n' >>> exc_info = failure.exc_info >>> raise exc_info[1] # Already has the traceback Traceback (most recent call last): ... KeyError We wrap the original exception to give the calling application access to the test and example information. If the output doesn't match, then a DocTestFailure is raised: >>> test = DocTestParser().get_doctest(''' ... >>> x = 1 ... >>> x ... 2 ... ''', {}, 'foo', 'foo.py', 0) >>> try: ... runner.run(test) ... except DocTestFailure as f: ... failure = f DocTestFailure objects provide access to the test: >>> failure.test is test True As well as to the example: >>> failure.example.want '2\n' and the actual output: >>> failure.got '1\n' If a failure or error occurs, the globals are left intact: >>> del test.globs['__builtins__'] >>> test.globs {'x': 1} >>> test = DocTestParser().get_doctest(''' ... >>> x = 2 ... >>> raise KeyError ... ''', {}, 'foo', 'foo.py', 0) >>> runner.run(test) Traceback (most recent call last): ... doctest.UnexpectedException: >>> del test.globs['__builtins__'] >>> test.globs {'x': 2} But the globals are cleared if there is no error: >>> test = DocTestParser().get_doctest(''' ... >>> x = 2 ... ''', {}, 'foo', 'foo.py', 0) >>> runner.run(test) TestResults(failed=0, attempted=1) >>> test.globs {} NTcCs$t||||d}|r |j|S)NF)rrRr1rN)rjr r2rrQrr,r,r-rR1s zDebugRunner.runcCst|||dSrl)rr(r,r,r-r)7sz'DebugRunner.report_unexpected_exceptioncCst|||dSrl)rr#r,r,r-r':szDebugRunner.report_failure)NNT)r6rprqrrRr)r'r,r,r,r-rsZ rTFc Cs|durtjd}t|s,td|f|dur:|j}t|d} |rVt||d} n t ||d} | j ||||dD]} | | qt|r| t dur| a n t | t| j| jS)a* m=None, name=None, globs=None, verbose=None, report=True, optionflags=0, extraglobs=None, raise_on_error=False, exclude_empty=False Test examples in docstrings in functions and classes reachable from module m (or the current module if m is not supplied), starting with m.__doc__. Also test examples reachable from dict m.__test__ if it exists and is not None. m.__test__ maps names to functions, classes and strings; function and class docstrings are tested even if the name is private; strings are tested directly, as if they were docstrings. Return (#failures, #tests). See help(doctest) for an overview. Optional keyword arg "name" gives the name of the module; by default use m.__name__. Optional keyword arg "globs" gives a dict to be used as the globals when executing examples; by default, use m.__dict__. A copy of this dict is actually used for each docstring, so that each docstring's examples start with a clean slate. Optional keyword arg "extraglobs" gives a dictionary that should be merged into the globals that are used to execute examples. By default, no extra globals are used. This is new in 2.4. Optional keyword arg "verbose" prints lots of stuff if true, prints only failures if false; by default, it's true iff "-v" is in sys.argv. Optional keyword arg "report" prints a summary at the end when true, else prints nothing at the end. In verbose mode, the summary is detailed, else very brief (in fact, empty if all tests passed). Optional keyword arg "optionflags" or's together module constants, and defaults to 0. This is new in 2.3. Possible values (see the docs for details): DONT_ACCEPT_TRUE_FOR_1 DONT_ACCEPT_BLANKLINE NORMALIZE_WHITESPACE ELLIPSIS SKIP IGNORE_EXCEPTION_DETAIL REPORT_UDIFF REPORT_CDIFF REPORT_NDIFF REPORT_ONLY_FIRST_FAILURE Optional keyword arg "raise_on_error" raises an exception on the first unexpected exception or failure. This allows failures to be post-mortem debugged. Advanced tomfoolery: testmod runs methods of a local instance of class doctest.Tester, then merges the results into (or creates) global Tester instance doctest.master. Methods of doctest.master can be called directly too, if you want to do something unusual. Passing report=0 to testmod is especially useful then, to delay displaying a summary. Invoke doctest.master.summarize(verbose) when you're done fiddling. Nrztestmod: module required; %r)rrrr1r)r>r?r/r7r8rBr6rrrrvrRrTmasterrVr%rr) rr+r1rreportrrraise_on_errorrfinderrunnerr r,r,r-rFs$E      rc Cs|r|stdt|||| pd\} }|dur:tj|}|durHi}n|}|durb||d|vrrd|d<| rt||d} n t||d} | | |||d}| ||r| t dur| a n t | 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.rANr6rrer")rrXrrbasenamerrrrrrRrTrgrVr%rr)rTrVr+rUr1rrhrrrirrNtextrkr r,r,r-rs2R     rNoNamec Cs@t|dd}t||d}|j|||dD]}|j||dq(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)rrre)r1)r2N)rrrvrR) rWr1rr+r2rrjrkr r,r,r-r)s  rcCs"|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)r2oldr,r,r-rFs   rc@sleZdZdddZddZddZd d Zd d Zd dZddZ ddZ ddZ ddZ e jZddZdS) DocTestCaser"NcCs:tj|||_||_|j|_||_||_ ||_ dSrl) unittestTestCaser_dt_optionflags _dt_checkerr1r _dt_globs_dt_test _dt_setUp _dt_tearDown)rjr rsetUptearDownr r,r,r-rls  zDocTestCase.__init__cCs|j}|jdur||dSrl)rxryrjr r,r,r-r{ws zDocTestCase.setUpcCs6|j}|jdur|||j|j|jdSrl)rxrzr1rNrrwr}r,r,r-r|}s    zDocTestCase.tearDowncCs|j}tj}t}|j}|t@s(|tO}t||jdd}z&d|_ |j ||j dd\}}W|t_n|t_0|r| | |dS)NFrr rzF----------------------------------------------------------------------)rrQ)rxr>rr#rur rprrvr+rRrDZfailureExceptionformat_failurerc)rjr rqnewrrkrrr,r,r-runTests" zDocTestCase.runTestcCsP|j}|jdurd}n d|j}d|jddd}d|j|j|||fS)Nzunknown line numberz%srrrz:Failed doctest test for %s File "%s", line %s, in %s %s)rxrrr+rtrT)rjerrr rZlnamer,r,r-rs  zDocTestCase.format_failurecCs6|t|j|jdd}|j|jdd|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~)rQN)r{rrurvrRrxr|)rjrkr,r,r-r!s BzDocTestCase.debugcCs|jjSrlrxr+rr,r,r-rszDocTestCase.idcCsPt|t|urtS|j|jkoN|j|jkoN|j|jkoN|j|jkoN|j|jkSrl)rrrxruryrzrvrr,r,r-rs     zDocTestCase.__eq__cCst|j|j|j|jfSrl)rruryrzrvrr,r,r-r szDocTestCase.__hash__cCs,|jjd}d|dd|ddfS)Nrz%s (%s)rr)rxr+rtr)rjr+r,r,r-r szDocTestCase.__repr__cCs d|jjS)Nz Doctest: rrr,r,r-shortDescription szDocTestCase.shortDescription)r"NNN)r6rprqrr{r|rrr!rrrrrrbrr,r,r,r-rrjs   H rrc@s0eZdZddZddZddZddZeZd S) SkipDocTestCasecCs||_t|ddSrl)rCrrr)rjrCr,r,r-r szSkipDocTestCase.__init__cCs|ddS)Nz-DocTestSuite will not work with -O2 and above)ZskipTestrr,r,r-r{ szSkipDocTestCase.setUpcCsdSrlr,rr,r,r- test_skip szSkipDocTestCase.test_skipcCs d|jjS)NzSkipping tests from %s)rCr6rr,r,r-r sz SkipDocTestCase.shortDescriptionN)r6rprqrr{rrrbr,r,r,r-r s rc@seZdZddZdS) _DocTestSuitecCsdSrlr,)rjindexr,r,r-_removeTestAtIndex sz _DocTestSuite._removeTestAtIndexN)r6rprqrr,r,r,r-r src Ks|durt}t|}|j|||d}|sNtjjdkrNt}|t||S| t}|D]X}t |j dkrtq`|j s|j }|dddkr|dd}||_ |t|fi|q`|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. Nrfr4r"rrrr)rrDrvr>r2optimizeraddTestrrr)rrTrrr) rCr1rZ test_finderrrsuiter rTr,r,r-r$ s(% rc@s$eZdZddZddZddZdS) DocFileCasecCsd|jjdS)NrPr)rrxr+rtrr,r,r-rf szDocFileCase.idcCs|jjSrl)rxrTrr,r,r-ri szDocFileCase.__repr__cCsd|jj|jj|fS)Nz2Failed doctest test for %s File "%s", line 0 %s)rxr+rT)rjrr,r,r-rl szDocFileCase.format_failureN)r6rprqrrrr,r,r,r-rd src Ksz|duri}n|}|r&|s&tdt||||p4d\}}d|vrL||d<tj|}|||||d} t| fi|S)NrlrArr")rrrXrrrmrr) rrVrUr1rrNrdocr+r r,r,r- DocFileTestq s rcOsHt}|ddr$t|d|d<|D]}|t|fi|q(|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. rVTrU)rr/rDrr)pathskwrrr,r,r-r s 8 rcCsg}t|D]x}t|trh||jdd|j}|r|d|dd|dddD7}q|dd|dddD7}q|r|ddkr|q|r|d dkr|d qd |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 Nrrz # Expected:cSsg|] }d|qS)z## r,rr,r,r-r rz(script_from_examples..rFcSsg|] }t|qSr,)rrr,r,r-r sr}r") rrr9rrrrwrtpopr)r]rZpiecerwr,r,r-r s :  "   rcsJt|}t|}fdd|D}|s4td|d}t|j}|S)aExtract the test sources from a doctest docstring as a script. Provide the module (or dotted name of the module) containing the test to be debugged and the name (within the module) of the object with the doc string with tests to be debugged. csg|]}|jkr|qSr,r*)rr7r*r,r-r/ rztestsource..znot found in testsr")rDrrvrrr)rCr+rr testsrcr,r*r-r& s   rcCst|}t|||dS)z4Debug a single doctest docstring, in argument `src`'N)r debug_script)srcpmr1rr,r,r-r 6 sr cCsddl}|r|}ni}|rvzt|||Wqttd|jdd}||dtdYq0n|jdd d|||dS)z7Debug a test script. `src` is the script, as a string.r"Nr&T)rr4zexec(%r)) rrr-rr>rdrrHZ interactionrR)rrr1rpr,r,r-r; s  rcCs$t|}t||}t|||jdS)zDebug a single doctest docstring. Provide the module (or dotted name of the module) containing the test to be debugged and the name (within the module) of the object with the docstring with tests to be debugged. N)rDrrr)rCr+rrr,r,r-r!O s r!c@s(eZdZdZddZddZddZdS) _TestClassz A pointless class, for sanity-checking of docstring testing. Methods: square() get() >>> _TestClass(13).get() + _TestClass(-12).get() 1 >>> hex(_TestClass(13).square().get()) '0xa9' cCs ||_dS)zval -> _TestClass object with associated value val. >>> t = _TestClass(123) >>> print(t.get()) 123 Nr )rjr r,r,r-rk sz_TestClass.__init__cCs|jd|_|S)zosquare() -> square TestClass's associated value >>> _TestClass(13).square().get() 169 r4rrr,r,r-squareu s z_TestClass.squarecCs|jS)z~get() -> return TestClass's associated value. >>> x = _TestClass(-42) >>> print(x.get()) -42 rrr,r,r-r/ sz_TestClass.getN)r6rprqrrrr/r,r,r,r-r] s   rz 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] )rrzbool-int equivalencez blank linesZellipsiszwhitespace normalizationc Cs"ddl}|jdd}|jdddddd |jd d d tgd d|jddddd|jdddd|}|j}|j}d}|jD]}|t|O}q|j r|t O}|D]v}| drt j |\}}tj d|t|dd} tj d=t| ||d\} } nt|d||d\} } | rdSqdS)Nr"zdoctest runner)Z descriptionrz --verbose store_trueFz'print very verbose output for all tests)actiondefaulthelpz-oz--optionrzqspecify a doctest option flag to apply to the test run; may be specified more than once to apply multiple options)rchoicesrrz-fz --fail-fastzystop running tests after first failure (this is a shorthand for -o FAIL_FAST, and is in addition to any other -o options))rrr`rz file containing the tests to run)nargsrz.pyre)rVrrr&)argparseArgumentParser add_argumentr'keys parse_argsr`rrZ fail_fastrrirrrtr>insertr;rr) rrrZ testfilesrrrrTdirnamerrrPr,r,r-_test sH       rr)r4)rY) NNNNTr"NFF)FroNr")NNNN)FN)FN)F)SrZ __docformat____all__r.r^r7rrrr[r>rarsior# collectionsr$r%r'rrrrrrrrr r r r rr rZrsr3rDrJrXr_rfrgr|rrrrrOrrrrrr ExceptionrrrrgrrrrprrtrrrZ TestSuiterrrrrrrr rr!rrrr6exitr,r,r,r- s'-      1%.DKl:;n h { $$ @  IR   , 3-