summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2014-03-12 08:10:51 (GMT)
committerÉric Araujo <merwok@netwok.org>2014-03-12 08:10:51 (GMT)
commita0fe1f74f928bec969dad25e8dc97b560748b182 (patch)
treecd4aebc7d8e5ed6d8e7671013cb464e3f6af608d /Lib/distutils/tests
parent03a4da55cba54bd7237c686ae39cf175f723c785 (diff)
parentfc773a2d4ba3810b982e703bf8a240206369e5d1 (diff)
downloadcpython-a0fe1f74f928bec969dad25e8dc97b560748b182.zip
cpython-a0fe1f74f928bec969dad25e8dc97b560748b182.tar.gz
cpython-a0fe1f74f928bec969dad25e8dc97b560748b182.tar.bz2
Merge 3.3 (#4931)
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r--Lib/distutils/tests/test_util.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_util.py b/Lib/distutils/tests/test_util.py
index 548865c..4e9d79b 100644
--- a/Lib/distutils/tests/test_util.py
+++ b/Lib/distutils/tests/test_util.py
@@ -8,7 +8,8 @@ from test.support import run_unittest
from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError
from distutils.util import (get_platform, convert_path, change_root,
check_environ, split_quoted, strtobool,
- rfc822_escape, byte_compile)
+ rfc822_escape, byte_compile,
+ grok_environment_error)
from distutils import util # used to patch _environ_checked
from distutils.sysconfig import get_config_vars
from distutils import sysconfig
@@ -285,6 +286,13 @@ class UtilTestCase(support.EnvironGuard, unittest.TestCase):
finally:
sys.dont_write_bytecode = old_dont_write_bytecode
+ def test_grok_environment_error(self):
+ # test obsolete function to ensure backward compat (#4931)
+ exc = IOError("Unable to find batch file")
+ msg = grok_environment_error(exc)
+ self.assertEqual(msg, "error: Unable to find batch file")
+
+
def test_suite():
return unittest.makeSuite(UtilTestCase)