From 8c6c495c76c575d35db2db6a2a1c1fea5f9d0499 Mon Sep 17 00:00:00 2001 From: Pulkit Goyal <7895pulkit@gmail.com> Date: Sat, 16 Apr 2016 03:38:23 +0530 Subject: [PATCH] tests: make test-doctest use absolute_import --- tests/test-check-py3-compat.t | 1 - tests/test-doctest.py | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t index 45deec12ca..7803782a7f 100644 --- a/tests/test-check-py3-compat.t +++ b/tests/test-check-py3-compat.t @@ -55,7 +55,6 @@ tests/test-atomictempfile.py not using absolute_import tests/test-demandimport.py not using absolute_import tests/test-demandimport.py requires print_function - tests/test-doctest.py not using absolute_import tests/test-trusted.py requires print_function #if py3exe diff --git a/tests/test-doctest.py b/tests/test-doctest.py index 523e2973d4..f8094562e3 100644 --- a/tests/test-doctest.py +++ b/tests/test-doctest.py @@ -1,8 +1,12 @@ # this is hack to make sure no escape characters are inserted into the output -import os, sys + +from __future__ import absolute_import + +import doctest +import os +import sys if 'TERM' in os.environ: del os.environ['TERM'] -import doctest def testmod(name, optionflags=0, testtarget=None): __import__(name)