aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-07-05 16:31:24 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-07-05 16:34:48 -0400
commitf3b4a9972163e6063b9d37db6352a54735955d81 (patch)
tree82377428ec4521fdb95de4eaf38c202678fe256c
parent76d53a85676ff2ac0947a409e9f49bb06b191636 (diff)
downloadexternal_python_setuptools-f3b4a9972163e6063b9d37db6352a54735955d81.tar.gz
external_python_setuptools-f3b4a9972163e6063b9d37db6352a54735955d81.tar.bz2
external_python_setuptools-f3b4a9972163e6063b9d37db6352a54735955d81.zip
Add test for spawn when exe is missing. Ref pypa/distutils#3.
-rw-r--r--distutils/tests/test_spawn.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/distutils/tests/test_spawn.py b/distutils/tests/test_spawn.py
index 919d0ad9..704019a1 100644
--- a/distutils/tests/test_spawn.py
+++ b/distutils/tests/test_spawn.py
@@ -126,6 +126,11 @@ class SpawnTestCase(support.TempdirManager,
rv = find_executable(program)
self.assertEqual(rv, filename)
+ def test_spawn_missing_exe(self):
+ with self.assertRaises(DistutilsExecError) as ctx:
+ spawn(['does-not-exist'])
+ assert 'command does-no-exist failed' in str(ctx)
+
def test_suite():
return unittest.makeSuite(SpawnTestCase)