diff options
| author | Victor Stinner <vstinner@redhat.com> | 2018-11-30 13:22:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-30 13:22:44 +0100 |
| commit | 304315d251dbb4e85dd86056ba1925f25e646ca1 (patch) | |
| tree | 827d924992edc2522f0f816a0e88c5f1fdd06bc0 /Lib/difflib.py | |
| parent | ebd5d6d6e6e4e751ba9c7534004aadfc27ba9265 (diff) | |
| download | cpython-git-304315d251dbb4e85dd86056ba1925f25e646ca1.tar.gz | |
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/difflib.py')
0 files changed, 0 insertions, 0 deletions
