Show More
@@ -5,10 +5,16 from __future__ import absolute_import | |||||
5 | import doctest |
|
5 | import doctest | |
6 | import os |
|
6 | import os | |
7 | import sys |
|
7 | import sys | |
|
8 | ||||
|
9 | ispy3 = (sys.version_info[0] >= 3) | |||
|
10 | ||||
8 | if 'TERM' in os.environ: |
|
11 | if 'TERM' in os.environ: | |
9 | del os.environ['TERM'] |
|
12 | del os.environ['TERM'] | |
10 |
|
13 | |||
11 | def testmod(name, optionflags=0, testtarget=None): |
|
14 | # TODO: migrate doctests to py3 and enable them on both versions | |
|
15 | def testmod(name, optionflags=0, testtarget=None, py2=True, py3=False): | |||
|
16 | if not (not ispy3 and py2 or ispy3 and py3): | |||
|
17 | return | |||
12 | __import__(name) |
|
18 | __import__(name) | |
13 | mod = sys.modules[name] |
|
19 | mod = sys.modules[name] | |
14 | if testtarget is not None: |
|
20 | if testtarget is not None: |
General Comments 0
You need to be logged in to leave comments.
Login now