]> granicus.if.org Git - python/commitdiff
Provide a little better debug output (#6940)
authorBarry Warsaw <barry@python.org>
Thu, 17 May 2018 15:54:01 +0000 (11:54 -0400)
committerGitHub <noreply@github.com>
Thu, 17 May 2018 15:54:01 +0000 (11:54 -0400)
Lib/test/test_socket.py

index 44501d922ad348dd8f9194c11f6b7416b50093e5..f377ebcb27b2bf23d362b612ffa7c8bbb2b64787 100644 (file)
@@ -893,7 +893,7 @@ class GeneralModuleTests(unittest.TestCase):
         )
         for addr in ['0.1.1.~1', '1+.1.1.1', '::1q', '::1::2',
                      '1:1:1:1:1:1:1:1:1']:
-            with self.assertRaises(OSError):
+            with self.assertRaises(OSError, msg=addr):
                 socket.gethostbyname(addr)
             with self.assertRaises(OSError, msg=explanation):
                 socket.gethostbyaddr(addr)