diff options
Diffstat (limited to 'Lib/test/test_socket.py')
-rwxr-xr-x | Lib/test/test_socket.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index aefba4f..dc13307 100755 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -917,10 +917,8 @@ class GeneralModuleTests(unittest.TestCase): self.assertIn('not NoneType', str(cm.exception)) with self.assertRaises(TypeError) as cm: s.sendto(b'foo', 'bar', sockname) - self.assertIn('an integer is required', str(cm.exception)) with self.assertRaises(TypeError) as cm: s.sendto(b'foo', None, None) - self.assertIn('an integer is required', str(cm.exception)) # wrong number of args with self.assertRaises(TypeError) as cm: s.sendto(b'foo') @@ -1899,11 +1897,11 @@ class GeneralModuleTests(unittest.TestCase): socket.SOCK_STREAM) def test_socket_fileno_rejects_float(self): - with self.assertRaisesRegex(TypeError, "integer argument expected"): + with self.assertRaises(TypeError): socket.socket(socket.AF_INET, socket.SOCK_STREAM, fileno=42.5) def test_socket_fileno_rejects_other_types(self): - with self.assertRaisesRegex(TypeError, "integer is required"): + with self.assertRaises(TypeError): socket.socket(socket.AF_INET, socket.SOCK_STREAM, fileno="foo") def test_socket_fileno_rejects_invalid_socket(self): |