diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-11-20 19:04:17 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-11-20 19:04:17 (GMT) |
commit | b3aedd48621ed9d33b5f42f946b256bce4a50673 (patch) | |
tree | 2297c8ebce1b09621e1d98096c1603896d9a0f0c /Lib/test/test_socketserver.py | |
parent | b8bc439b2093add9b313bcca2cc507a2d0e87764 (diff) | |
download | cpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.zip cpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.tar.gz cpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.tar.bz2 |
#9424: Replace deprecated assert* methods in the Python test suite.
Diffstat (limited to 'Lib/test/test_socketserver.py')
-rw-r--r-- | Lib/test/test_socketserver.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index deaeee1..1907800 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -57,8 +57,8 @@ def simple_subprocess(testcase): os._exit(72) yield None pid2, status = os.waitpid(pid, 0) - testcase.assertEquals(pid2, pid) - testcase.assertEquals(72 << 8, status) + testcase.assertEqual(pid2, pid) + testcase.assertEqual(72 << 8, status) @unittest.skipUnless(threading, 'Threading required for this test.') @@ -120,7 +120,7 @@ class SocketServerTest(unittest.TestCase): if verbose: print("creating server") server = MyServer(addr, MyHandler) - self.assertEquals(server.server_address, server.socket.getsockname()) + self.assertEqual(server.server_address, server.socket.getsockname()) return server @unittest.skipUnless(threading, 'Threading required for this test.') @@ -161,7 +161,7 @@ class SocketServerTest(unittest.TestCase): while data and b'\n' not in buf: data = receive(s, 100) buf += data - self.assertEquals(buf, TEST_STR) + self.assertEqual(buf, TEST_STR) s.close() def dgram_examine(self, proto, addr): @@ -171,7 +171,7 @@ class SocketServerTest(unittest.TestCase): while data and b'\n' not in buf: data = receive(s, 100) buf += data - self.assertEquals(buf, TEST_STR) + self.assertEqual(buf, TEST_STR) s.close() def test_TCPServer(self): |