From b8b6a68baa8860d1357d63fcb2cc3428dfaf147f Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 29 Jun 2012 19:40:35 +0200 Subject: Better diagnose test failure --- Lib/test/test_threading.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 00f73a7..17be84b 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -768,10 +768,10 @@ class ThreadingExceptionTests(BaseTestCase): """ expected_output = "end of main thread\n" p = subprocess.Popen([sys.executable, "-c", script], - stdout=subprocess.PIPE) + stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() data = stdout.decode().replace('\r', '') - self.assertEqual(p.returncode, 0, "Unexpected error") + self.assertEqual(p.returncode, 0, "Unexpected error: " + stderr.decode()) self.assertEqual(data, expected_output) class LockTests(lock_tests.LockTests): -- cgit v0.12