mirror of
https://github.com/facebook/sapling.git
synced 2025-01-04 03:06:30 +03:00
tests: make doctest test runner less verbose
This commit is contained in:
parent
ca46558bdd
commit
18b361e0b2
@ -1,49 +1,28 @@
|
||||
# this is hack to make sure no escape characters are inserted into the output
|
||||
import os
|
||||
import os, sys
|
||||
if 'TERM' in os.environ:
|
||||
del os.environ['TERM']
|
||||
import doctest
|
||||
|
||||
import mercurial.util
|
||||
doctest.testmod(mercurial.util)
|
||||
# Only run doctests for the current platform
|
||||
doctest.testmod(mercurial.util.platform)
|
||||
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)
|
||||
|
||||
import mercurial.changelog
|
||||
doctest.testmod(mercurial.changelog)
|
||||
|
||||
import mercurial.dagparser
|
||||
doctest.testmod(mercurial.dagparser, optionflags=doctest.NORMALIZE_WHITESPACE)
|
||||
|
||||
import mercurial.match
|
||||
doctest.testmod(mercurial.match)
|
||||
|
||||
import mercurial.store
|
||||
doctest.testmod(mercurial.store)
|
||||
|
||||
import mercurial.ui
|
||||
doctest.testmod(mercurial.ui)
|
||||
|
||||
import mercurial.url
|
||||
doctest.testmod(mercurial.url)
|
||||
|
||||
import mercurial.dispatch
|
||||
doctest.testmod(mercurial.dispatch)
|
||||
|
||||
import mercurial.encoding
|
||||
doctest.testmod(mercurial.encoding)
|
||||
|
||||
import mercurial.hgweb.hgwebdir_mod
|
||||
doctest.testmod(mercurial.hgweb.hgwebdir_mod)
|
||||
|
||||
import hgext.convert.cvsps
|
||||
doctest.testmod(hgext.convert.cvsps)
|
||||
|
||||
import mercurial.revset
|
||||
doctest.testmod(mercurial.revset)
|
||||
|
||||
import mercurial.minirst
|
||||
doctest.testmod(mercurial.minirst)
|
||||
|
||||
import mercurial.templatefilters
|
||||
doctest.testmod(mercurial.templatefilters)
|
||||
testmod('mercurial.changelog')
|
||||
testmod('mercurial.dagparser', optionflags=doctest.NORMALIZE_WHITESPACE)
|
||||
testmod('mercurial.dispatch')
|
||||
testmod('mercurial.encoding')
|
||||
testmod('mercurial.hgweb.hgwebdir_mod')
|
||||
testmod('mercurial.match')
|
||||
testmod('mercurial.minirst')
|
||||
testmod('mercurial.revset')
|
||||
testmod('mercurial.store')
|
||||
testmod('mercurial.templatefilters')
|
||||
testmod('mercurial.ui')
|
||||
testmod('mercurial.url')
|
||||
testmod('mercurial.util')
|
||||
testmod('mercurial.util', testtarget='platform')
|
||||
testmod('hgext.convert.cvsps')
|
||||
|
Loading…
Reference in New Issue
Block a user