Commits

Arc Riley  committed f19a726

Changed test.test_support import to test.support when running on Python 3

  • Participants
  • Parent commits bddf76e

Comments (0)

Files changed (3)

File distutils2/_backport/tests/test_pkgutil.py

 except ImportError:
     from distutils2._backport.hashlib import md5
 
-from test.test_support import TESTFN
-
-from distutils2.tests import unittest, run_unittest, support
+from distutils2.tests import unittest, run_unittest, support, TESTFN
 from distutils2._backport import pkgutil
 
 try:

File distutils2/_backport/tests/test_sysconfig.py

         get_config_var, get_config_vars, get_path, get_paths, get_platform,
         get_scheme_names, _main, _SCHEMES)
 
-from distutils2.tests import unittest
+from distutils2.tests import unittest, TESTFN, unlink
 from distutils2.tests.support import EnvironGuard
-from test.test_support import TESTFN, unlink
+
 try:
     from test.test_support import skip_unless_symlink
 except ImportError:

File distutils2/tests/__init__.py

     except ImportError:
         sys.exit('Error: You have to install unittest2')
 
-
-from test.test_support import TESTFN    # use TESTFN from stdlib/test_support.
+# use TESTFN from stdlib, pull in unlink for other modules to use as well
+if sys.version_info[0] == 3:
+  from test.support import TESTFN, unlink
+else :
+  from test.test_support import TESTFN, unlink
 
 here = os.path.dirname(__file__) or os.curdir