diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-11-30 12:22:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-30 12:22:44 (GMT) |
commit | 304315d251dbb4e85dd86056ba1925f25e646ca1 (patch) | |
tree | 827d924992edc2522f0f816a0e88c5f1fdd06bc0 /Lib/json | |
parent | ebd5d6d6e6e4e751ba9c7534004aadfc27ba9265 (diff) | |
download | cpython-304315d251dbb4e85dd86056ba1925f25e646ca1.zip cpython-304315d251dbb4e85dd86056ba1925f25e646ca1.tar.gz cpython-304315d251dbb4e85dd86056ba1925f25e646ca1.tar.bz2 |
bpo-35347: Cleanup test_socket.NonBlockingTCPTests (GH-10818)
* Replace testInheritFlags() with two tests:
testInheritFlagsBlocking() and testInheritFlagsTimeout()
to test different default socket timeout. Moreover, the test now
checks sock.gettimeout() rather than a functional test on recv().
* Replace time.time() with time.monotonic()
* Add socket_setdefaulttimeout() context manager to restore the
default timeout when the test completes.
* Remove testConnect(): accept() wasn't blocking and testAccept()
already tests non-blocking accept().
* Remove accept() functional test from testInitNonBlocking():
already tested by testAccept()
* Rewrite testSetBlocking() with a new assert_sock_timeout() method
* Use addCleanup() and context manager to close sockets
* Replace assertTrue(x < y) with assertLess(x, y)
Diffstat (limited to 'Lib/json')
0 files changed, 0 insertions, 0 deletions