summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-29235: Make cProfile.Profile a context manager (GH-6808)Scott Sanderson2018-06-011-0/+27
|
* bpo-33532: Fix test_multiprocessing_forkserver.test_ignore() (GH-7319)Victor Stinner2018-06-011-2/+5
| | | | Use also support.SOCK_MAX_SIZE, not only support.PIPE_MAX_SIZE, to get the size for a blocking send into a multiprocessing pipe.
* bpo-33718: regrtest: enhance "running:" formatting (GH-7292)Victor Stinner2018-06-013-43/+51
| | | | | * "running:" progress: Format number of seconds as hours and minutes * format_duration(): count also minutes as hours * Create Lib/test/libregrtest/utils.py
* bpo-33692: pythoninfo detect libedit on Python 3.6 (GH-7293)Victor Stinner2018-06-011-0/+8
| | | | Check which readline implementation is used based on the readline docstring.
* bpo-33606: improve logging performance when logger is disabled (GH-7285)Timo Furrer2018-06-011-0/+12
| | | A check has been added in Logger.isEnabledFor() to return False when the logger is disabled. This avoids unnecessary work being done when a disabled logger is used.
* bpo-33718: regrtest keeps filters to re-run fails (GH-7291)Victor Stinner2018-05-311-17/+22
| | | | | | * No longer clear filters, like --match, to re-run failed tests in verbose mode (-w option). * Tests result: always indicate if tests have been interrupted. * Enhance tests summary
* bpo-33717: pythoninfo: add CC --version (#7290)Victor Stinner2018-05-311-0/+29
| | | Get the version of the C compiler.
* bpo-33615: Temporarily disable a test that is triggering crashes on a few ↵Eric Snow2018-05-311-0/+2
| | | | | buildbots. (gh-7288) For bpo-32604 I added some subinterpreter-related tests (see #6914) that are causing crashes on a few buildbots. I'm working on fixing the crashes (see #7251). This change temporarily disables the triggering test.
* bpo-33532: Fix multiprocessing test_ignore() (#7262)Victor Stinner2018-05-311-2/+2
| | | | | Fix test_ignore() of multiprocessing tests like test_multiprocessing_forkserver: use support.PIPE_MAX_SIZE to make sure that send_bytes() blocks.
* bpo-33238: Add InvalidStateError to concurrent.futures. (GH-7056)jhaydaman2018-05-301-0/+28
| | | | | | | Future.set_result and Future.set_exception now raise InvalidStateError if the futures are not pending or running. This mirrors the behavior of asyncio.Future, and prevents AssertionErrors in asyncio.wrap_future when set_result is called multiple times.
* Revert "A better fix for asyncio test_stdin_broken_pipe (GH-7221)" (GH-7235)Yury Selivanov2018-05-301-4/+2
| | | | | This reverts commit ad74d50517c069359578014bb32e660828d68332. Turns out it's not a good fix -- Travis has just crashed on this test.
* A better fix for asyncio test_stdin_broken_pipe (#7221)Yury Selivanov2018-05-301-2/+4
|
* Revert "bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)" (#7232)Yury Selivanov2018-05-301-32/+0
| | | This reverts commit 5d97b7bcc19496617bf8c448d2f149cc28c73bc7.
* bpo-32684: Fix nits in tests (GH-7225)Yury Selivanov2018-05-291-3/+3
|
* bpo-32751: Wait for task cancellation in asyncio.wait_for() (GH-7216)Elvis Pranskevichus2018-05-292-0/+69
| | | | | | | | | | | | | | | | | | | | | | | Currently, asyncio.wait_for(fut), upon reaching the timeout deadline, cancels the future and returns immediately. This is problematic for when *fut* is a Task, because it will be left running for an arbitrary amount of time. This behavior is iself surprising and may lead to related bugs such as the one described in bpo-33638: condition = asyncio.Condition() async with condition: await asyncio.wait_for(condition.wait(), timeout=0.5) Currently, instead of raising a TimeoutError, the above code will fail with `RuntimeError: cannot wait on un-acquired lock`, because `__aexit__` is reached _before_ `condition.wait()` finishes its cancellation and re-acquires the condition lock. To resolve this, make `wait_for` await for the task cancellation. The tradeoff here is that the `timeout` promise may be broken if the task decides to handle its cancellation in a slow way. This represents a behavior change and should probably not be back-patched to 3.6 and earlier.
* bpo-32684: Fix gather to propagate cancel of itself with return_exceptions ↵Yury Selivanov2018-05-291-1/+28
| | | | (GH-7209)
* bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)Yury Selivanov2018-05-291-0/+32
| | | | Original patch by Dan O'Reilly.
* Attempt to fix test_stdin_broken_pipe on Travis (#7210)Yury Selivanov2018-05-291-0/+1
|
* bpo-33197: Update a error message of invalid inspect.Parameters. (GH-6636)Dong-hee Na2018-05-291-3/+22
|
* bpo-33353: test_asyncio use set_write_buffer_limits() (GH-7200)Victor Stinner2018-05-291-17/+29
| | | | | | | Use transport.set_write_buffer_limits() in sendfile tests of test_asyncio to make sure that the protocol is paused after sending 4 KiB. Previously, test_sendfile_fallback_close_peer_in_the_middle_of_receiving() failed on FreeBSD if the DATA was smaller than the default limit of 64 KiB.
* bpo-32911: Revert bpo-29463. (GH-7121) (GH-7197)Serhiy Storchaka2018-05-292-79/+64
| | | | | | Remove the docstring attribute of AST types and restore docstring expression as a first stmt in their body. Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
* bpo-33654: Support protocol type switching in SSLTransport.set_protocol() ↵Yury Selivanov2018-05-291-11/+36
| | | | (#7194)
* bpo-32410: Avoid blocking on file IO in sendfile fallback code (GH-7172)Yury Selivanov2018-05-282-0/+14
|
* bpo-32610: Fix asyncio.all_tasks() to return only pending tasks. (GH-7174)Yury Selivanov2018-05-281-2/+27
|
* bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171)Yury Selivanov2018-05-281-0/+18
|
* bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines (GH-7161)Yury Selivanov2018-05-281-0/+10
|
* bpo-32458: Further tune start_tls tests (#7166)Yury Selivanov2018-05-281-4/+6
|
* regrtest: repeat summary after re-run (GH-7159)Victor Stinner2018-05-281-6/+19
| | | | Using -w, when failing tests are re-run in verbose mode, display again the tests results at the end.
* bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)Yury Selivanov2018-05-285-35/+257
| | | | | | | | | | | In this commit: * Support BufferedProtocol in set_protocol() and start_tls() * Fix proactor to cancel readers reliably * Update tests to be compatible with OpenSSL 1.1.1 * Clarify BufferedProtocol docs * Bump TLS tests timeouts to 60 seconds; eliminate possible race from start_serving * Rewrite test_start_tls_server_1
* bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149)twisteroid ambassador2018-05-281-0/+6
| | | | | Fixed bug where calling write_eof() on a _SelectorSocketTransport after it's already closed raises AttributeError.
* bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145)Marcel Plch2018-05-281-7/+13
|
* bpo-32380: Create functools.singledispatchmethod (#6306)Ethan Smith2018-05-261-0/+118
|
* bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134)Ned Deily2018-05-261-1/+6
| | | | The failure may be due to the use oF ZFS, a case we already ignore for Solaris-based systems where ZFS is frequently used.
* test.regrtest: flush stdout when display progress (#7105)Victor Stinner2018-05-251-2/+2
| | | runtest_mp.py: call print() with flush=True.
* bpo-33629: Prevent coredump in test_importlib (GH-7090)Victor Stinner2018-05-241-1/+4
| | | | | bpo-32374, bpo-33629: Use support.SuppressCrashReport() in test_bad_traverse() of MultiPhaseExtensionModuleTests to prevent leaking a core dump file.
* bpo-33109: argparse subparsers are once again not required by default (GH-6919)Ned Deily2018-05-241-1/+3
| | | | | | | | | bpo-26510 in 3.7.0a2 changed the behavior of argparse to make subparsers required by default, returning to the behavior of 2.7 and 3.2. The behavior was changed in 3.3 to be no longer required. While it might make more sense to have the default to required, compatibility with 3.3 through 3.6 is probably less disruptive than trying to reintroduce compatibility with 2.7 at this point. This change restores the 3.6 behavior.
* bpo-33353: test_asyncio set SO_SNDBUF after connect (GH-7086)Victor Stinner2018-05-241-3/+9
| | | | | bpo-32622, bpo-33353: On macOS, sock.connect() changes the SO_SNDBUF value. Only set SO_SNDBUF and SO_RCVBUF buffer sizes once a socket is connected or binded, not before.
* bpo-33353: test_asyncio uses smaller sendfile data (#7083)Victor Stinner2018-05-231-2/+2
| | | | | | | | | | | | | bpo-32622, bpo-33353: sendfile() tests of test_asyncio use socket buffers of 1 kB "to test on relative small data sets". Send only 160 KiB rather 10 MB to make the test much faster. Shrink also SendfileBase.DATA from 1600 KiB to 160 KiB. On Linux, 3 test_sock_sendfile_mix_with_regular_send() runs now take less than 1 second, instead of 18 seconds. On FreeBSD, the 3 tests didn't hang, but took 3 minutes. Now the 3 tests pass in less than 1 seconds.
* bpo-33618: Enable TLS 1.3 in tests (GH-7079)Christian Heimes2018-05-235-33/+80
| | | | | | | | | | | | TLS 1.3 behaves slightly different than TLS 1.2. Session tickets and TLS client cert auth are now handled after the initialy handshake. Tests now either send/recv data to trigger session and client certs. Or tests ignore ConnectionResetError / BrokenPipeError on the server side to handle clients that force-close the socket fd. To test TLS 1.3, OpenSSL 1.1.1-pre7-dev (git master + OpenSSL PR https://github.com/openssl/openssl/pull/6340) is required. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-27300: Add the errors parameter to tempfile classes. (GH-6696)sth2018-05-231-1/+10
|
* bpo-33604: Remove Pending from hmac Deprecation warning. (GH-7062)Matthias Bussonnier2018-05-221-2/+2
| | | bpo-33604: Bump removal notice from 3.6 to 3.8 and change PendingDeprecationWarning to DeprecationWarning as we had intended to do earlier...
* bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976)Christian Heimes2018-05-221-29/+22
| | | | | | | | | | Change TLS 1.3 cipher suite settings for compatibility with OpenSSL 1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 cipers enabled by default. Also update multissltests and Travis config to test with latest OpenSSL. Signed-off-by: Christian Heimes <christian@python.org>
* Improve comments in test_idle.py. (GH-7057)Terry Jan Reedy2018-05-221-6/+8
|
* bpo-30877: Fix clearing a cache in the the JSON decoder. (GH-7048)Serhiy Storchaka2018-05-221-1/+3
|
* Use IPv4 only to avoid IP address collision (#7030)Andrew Svetlov2018-05-211-6/+4
|
* Fix asyncio flaky tests (#7023)Andrew Svetlov2018-05-211-2/+3
|
* bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450)Vlad Starostin2018-05-211-0/+15
| | | | | | | | | * bpo-33263 Fix FD leak in _SelectorSocketTransport. (GH-6450) Under particular circumstances _SelectorSocketTransport can try to add a reader even the transport is already being closed. This can lead to FD leak and invalid stated of the following connections. Fixed the SelectorSocketTransport to add the reader only if the trasport is still active.
* bpo-26103: Fix inspect.isdatadescriptor() and a data descriptor definition. ↵Aaron Hall, MBA2018-05-201-1/+56
| | | | | | (GH-1959) Look for '__set__' or '__delete__'.
* bpo-32262: Fix typo in f-string (GH-7016)Christian Heimes2018-05-201-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo from commit 6370f345e1d5829e1fba59cd695c8b82c5a8c620 Signed-off-by: Christian Heimes <christian@python.org> <!-- Thanks for your contribution! Please read this comment in its entirety. It's quite important. # Pull Request title It should be in the following format: ``` bpo-NNNN: Summary of the changes made ``` Where: bpo-NNNN refers to the issue number in the https://bugs.python.org. Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue. # Backport Pull Request title If this is a backport PR (PR made against branches other than `master`), please ensure that the PR title is in the following format: ``` [X.Y] <title from the original PR> (GH-NNNN) ``` Where: [X.Y] is the branch name, e.g. [3.6]. GH-NNNN refers to the PR number from `master`. --> <!-- issue-number: bpo-32262 --> https://bugs.python.org/issue32262 <!-- /issue-number -->
* bpo-26819: Prevent proactor double read on resume (#6921)CtrlZvi2018-05-201-1/+8
| | | | | | | | | | The proactor event loop has a race condition when reading with pausing/resuming. `resume_reading()` unconditionally schedules the read function to read from the current future. If `resume_reading()` was called before the previously scheduled done callback fires, this results in two attempts to get the data from the most recent read and an assertion failure. This commit tracks whether or not `resume_reading` needs to reschedule the callback to restart the loop, preventing a second attempt to read the data.