test-doctest.py
33 lines
| 1.0 KiB
| text/x-python
|
PythonLexer
/ tests / test-doctest.py
Mads Kiilerich
|
r7041 | # this is hack to make sure no escape characters are inserted into the output | ||
Mads Kiilerich
|
r20047 | import os, sys | ||
Patrick Mezard
|
r7078 | if 'TERM' in os.environ: | ||
Dirkjan Ochtman
|
r7184 | del os.environ['TERM'] | ||
Benoit Boissinot
|
r3232 | import doctest | ||
Mads Kiilerich
|
r20047 | def testmod(name, optionflags=0, testtarget=None): | ||
__import__(name) | ||||
mod = sys.modules[name] | ||||
if testtarget is not None: | ||||
mod = getattr(mod, testtarget) | ||||
doctest.testmod(mod, optionflags=optionflags) | ||||
Sune Foldager
|
r14171 | |||
Mads Kiilerich
|
r20047 | testmod('mercurial.changelog') | ||
testmod('mercurial.dagparser', optionflags=doctest.NORMALIZE_WHITESPACE) | ||||
testmod('mercurial.dispatch') | ||||
testmod('mercurial.encoding') | ||||
Yuya Nishihara
|
r20799 | testmod('mercurial.hg') | ||
Mads Kiilerich
|
r20047 | testmod('mercurial.hgweb.hgwebdir_mod') | ||
testmod('mercurial.match') | ||||
testmod('mercurial.minirst') | ||||
FUJIWARA Katsunori
|
r21568 | testmod('mercurial.pathutil') | ||
Mads Kiilerich
|
r20047 | testmod('mercurial.revset') | ||
testmod('mercurial.store') | ||||
Siddharth Agarwal
|
r20840 | testmod('mercurial.subrepo') | ||
Mads Kiilerich
|
r20047 | testmod('mercurial.templatefilters') | ||
testmod('mercurial.ui') | ||||
testmod('mercurial.url') | ||||
testmod('mercurial.util') | ||||
testmod('mercurial.util', testtarget='platform') | ||||
testmod('hgext.convert.cvsps') | ||||
Mads Kiilerich
|
r20048 | testmod('hgext.convert.filemap') | ||
Mads Kiilerich
|
r20419 | testmod('hgext.convert.subversion') | ||