##// END OF EJS Templates
tests: make doctest test runner less verbose
Mads Kiilerich -
r20047:10a7d2bc default
parent child Browse files
Show More
@@ -1,49 +1,28 b''
1 # this is hack to make sure no escape characters are inserted into the output
1 # this is hack to make sure no escape characters are inserted into the output
2 import os
2 import os, sys
3 if 'TERM' in os.environ:
3 if 'TERM' in os.environ:
4 del os.environ['TERM']
4 del os.environ['TERM']
5 import doctest
5 import doctest
6
6
7 import mercurial.util
7 def testmod(name, optionflags=0, testtarget=None):
8 doctest.testmod(mercurial.util)
8 __import__(name)
9 # Only run doctests for the current platform
9 mod = sys.modules[name]
10 doctest.testmod(mercurial.util.platform)
10 if testtarget is not None:
11
11 mod = getattr(mod, testtarget)
12 import mercurial.changelog
12 doctest.testmod(mod, optionflags=optionflags)
13 doctest.testmod(mercurial.changelog)
14
15 import mercurial.dagparser
16 doctest.testmod(mercurial.dagparser, optionflags=doctest.NORMALIZE_WHITESPACE)
17
18 import mercurial.match
19 doctest.testmod(mercurial.match)
20
21 import mercurial.store
22 doctest.testmod(mercurial.store)
23
24 import mercurial.ui
25 doctest.testmod(mercurial.ui)
26
13
27 import mercurial.url
14 testmod('mercurial.changelog')
28 doctest.testmod(mercurial.url)
15 testmod('mercurial.dagparser', optionflags=doctest.NORMALIZE_WHITESPACE)
29
16 testmod('mercurial.dispatch')
30 import mercurial.dispatch
17 testmod('mercurial.encoding')
31 doctest.testmod(mercurial.dispatch)
18 testmod('mercurial.hgweb.hgwebdir_mod')
32
19 testmod('mercurial.match')
33 import mercurial.encoding
20 testmod('mercurial.minirst')
34 doctest.testmod(mercurial.encoding)
21 testmod('mercurial.revset')
35
22 testmod('mercurial.store')
36 import mercurial.hgweb.hgwebdir_mod
23 testmod('mercurial.templatefilters')
37 doctest.testmod(mercurial.hgweb.hgwebdir_mod)
24 testmod('mercurial.ui')
38
25 testmod('mercurial.url')
39 import hgext.convert.cvsps
26 testmod('mercurial.util')
40 doctest.testmod(hgext.convert.cvsps)
27 testmod('mercurial.util', testtarget='platform')
41
28 testmod('hgext.convert.cvsps')
42 import mercurial.revset
43 doctest.testmod(mercurial.revset)
44
45 import mercurial.minirst
46 doctest.testmod(mercurial.minirst)
47
48 import mercurial.templatefilters
49 doctest.testmod(mercurial.templatefilters)
General Comments 0
You need to be logged in to leave comments. Login now