Arc Riley committed f19a726

Changed test.test_support import to when running on Python 3

  • Participants
  • Parent commits bddf76e

Comments (0)

Files changed (3)


 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


         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 import EnvironGuard
-from test.test_support import TESTFN, unlink
     from test.test_support import skip_unless_symlink
 except ImportError:


     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 import TESTFN, unlink
+else :
+  from test.test_support import TESTFN, unlink
 here = os.path.dirname(__file__) or os.curdir