tests/test-doctest.py
author Matt Mackall <mpm@selenic.com>
Sun, 01 Feb 2015 16:23:07 -0600
branchstable
changeset 23981 24b57c3899f8
parent 22546 aac5482db318
child 24243 daee2039dd11
permissions -rw-r--r--
filectx: use linkrev to sort ancestors We're going to make rev() lazily do _adjustlinkrevs, and we don't want that to happen when we're quickly tracing through file ancestry without caring about revs (as we do when finding copies). This takes us back to pre-linkrev-correction behavior, but shouldn't regress us relative to the last stable release.

# this is hack to make sure no escape characters are inserted into the output
import os, sys
if 'TERM' in os.environ:
    del os.environ['TERM']
import doctest

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)

testmod('mercurial.changelog')
testmod('mercurial.dagparser', optionflags=doctest.NORMALIZE_WHITESPACE)
testmod('mercurial.dispatch')
testmod('mercurial.encoding')
testmod('mercurial.hg')
testmod('mercurial.hgweb.hgwebdir_mod')
testmod('mercurial.match')
testmod('mercurial.minirst')
testmod('mercurial.pathutil')
testmod('mercurial.revset')
testmod('mercurial.store')
testmod('mercurial.subrepo')
testmod('mercurial.templatefilters')
testmod('mercurial.ui')
testmod('mercurial.url')
testmod('mercurial.util')
testmod('mercurial.util', testtarget='platform')
testmod('hgext.convert.cvsps')
testmod('hgext.convert.filemap')
testmod('hgext.convert.subversion')
testmod('hgext.mq')