diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-07 07:11:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-07 04:11:28 -0700 |
| commit | 6ae2780be0667a8dc52c4fb583171ec86067d700 (patch) | |
| tree | 6bbec94ee8c4ea515d767971defd780d601f1bde /Lib/distutils/tests | |
| parent | 782f44b8fb07ec33cee148b2b6b4cf53024fe0cd (diff) | |
| download | cpython-git-6ae2780be0667a8dc52c4fb583171ec86067d700.tar.gz | |
bpo-41207 In distutils.spawn, rewrite FileNotFound (GH-21359)
Automerge-Triggered-By: @jaraco
Diffstat (limited to 'Lib/distutils/tests')
| -rw-r--r-- | Lib/distutils/tests/test_spawn.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_spawn.py b/Lib/distutils/tests/test_spawn.py index 3647bab7b1..4ec767b120 100644 --- a/Lib/distutils/tests/test_spawn.py +++ b/Lib/distutils/tests/test_spawn.py @@ -124,6 +124,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']) + self.assertIn("command 'does-not-exist' failed", str(ctx.exception)) + def test_suite(): return unittest.makeSuite(SpawnTestCase) |
