]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Provide a little better debug output (GH-6940) (#6942)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 17 May 2018 16:53:24 +0000 (09:53 -0700)
committerBarry Warsaw <barry@python.org>
Thu, 17 May 2018 16:53:24 +0000 (12:53 -0400)
(cherry picked from commit 273f51f5ca9dd0420d327c95281b24078f8feeef)

Co-authored-by: Barry Warsaw <barry@python.org>
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)