From a21ea47bf0a8bbd79afdbd93b80681f1133aedf0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 7 Jul 2020 06:39:32 -0400 Subject: Move assert outside the context so it actually has its effect. --- distutils/tests/test_spawn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distutils/tests/test_spawn.py b/distutils/tests/test_spawn.py index 704019a1..adaa48ef 100644 --- a/distutils/tests/test_spawn.py +++ b/distutils/tests/test_spawn.py @@ -129,7 +129,7 @@ class SpawnTestCase(support.TempdirManager, 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) + self.assertIn("command 'does-not-exist' failed", str(ctx.exception)) def test_suite(): -- cgit v1.2.3