diff options
Diffstat (limited to 'Lib/test/test_socket.py')
-rwxr-xr-x | Lib/test/test_socket.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index e4af713..bc28030 100755 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1121,9 +1121,11 @@ class GeneralModuleTests(unittest.TestCase): s_good_values = [0, 1, 2, 0xffff] l_good_values = s_good_values + [0xffffffff] l_bad_values = [-1, -2, 1<<32, 1<<1000] - s_bad_values = l_bad_values + [_testcapi.INT_MIN - 1, - _testcapi.INT_MAX + 1] - s_deprecated_values = [1<<16, _testcapi.INT_MAX] + s_bad_values = ( + l_bad_values + + [_testcapi.INT_MIN-1, _testcapi.INT_MAX+1] + + [1 << 16, _testcapi.INT_MAX] + ) for k in s_good_values: socket.ntohs(k) socket.htons(k) @@ -1136,9 +1138,6 @@ class GeneralModuleTests(unittest.TestCase): for k in l_bad_values: self.assertRaises(OverflowError, socket.ntohl, k) self.assertRaises(OverflowError, socket.htonl, k) - for k in s_deprecated_values: - self.assertWarns(DeprecationWarning, socket.ntohs, k) - self.assertWarns(DeprecationWarning, socket.htons, k) def testGetServBy(self): eq = self.assertEqual |