test-doctest.py
40 lines
| 1.2 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 | |||
Augie Fackler
|
r27432 | testmod('mercurial.changegroup') | ||
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') | ||||
Siddharth Agarwal
|
r24243 | testmod('mercurial.patch') | ||
FUJIWARA Katsunori
|
r21568 | testmod('mercurial.pathutil') | ||
Yuya Nishihara
|
r25306 | testmod('mercurial.parser') | ||
Mads Kiilerich
|
r20047 | testmod('mercurial.revset') | ||
testmod('mercurial.store') | ||||
Siddharth Agarwal
|
r20840 | testmod('mercurial.subrepo') | ||
Mads Kiilerich
|
r20047 | testmod('mercurial.templatefilters') | ||
Yuya Nishihara
|
r25783 | testmod('mercurial.templater') | ||
Mads Kiilerich
|
r20047 | testmod('mercurial.ui') | ||
testmod('mercurial.url') | ||||
testmod('mercurial.util') | ||||
testmod('mercurial.util', testtarget='platform') | ||||
Eugene Baranov
|
r25805 | testmod('hgext.convert.convcmd') | ||
Mads Kiilerich
|
r20047 | testmod('hgext.convert.cvsps') | ||
Mads Kiilerich
|
r20048 | testmod('hgext.convert.filemap') | ||
Eugene Baranov
|
r25788 | testmod('hgext.convert.p4') | ||
Mads Kiilerich
|
r20419 | testmod('hgext.convert.subversion') | ||
Mads Kiilerich
|
r22546 | testmod('hgext.mq') | ||