Commit f3b4a997 authored by Jason R. Coombs's avatar Jason R. Coombs

Add test for spawn when exe is missing. Ref pypa/distutils#3.

parent 76d53a85
...@@ -126,6 +126,11 @@ class SpawnTestCase(support.TempdirManager, ...@@ -126,6 +126,11 @@ class SpawnTestCase(support.TempdirManager,
rv = find_executable(program) rv = find_executable(program)
self.assertEqual(rv, filename) 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(): def test_suite():
return unittest.makeSuite(SpawnTestCase) return unittest.makeSuite(SpawnTestCase)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment