summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261)Zackery Spytz2018-07-121-1/+1
| | | It was added in test_functools at 445f1b3.
* bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192)Serhiy Storchaka2018-07-111-0/+32
|
* bpo-34092, test_logging: increase SMTPHandlerTest timeout (GH-8245)Victor Stinner2018-07-111-2/+3
| | | | | Change test_logging.SMTPHandlerTest timeout from 8 seconds to 1 minute. The test failed randomly on the slow x86 Gentoo Refleaks 3.7 buildbot.
* Simplify __all__ in multiprocessing (GH-6856)Derek B. Kim2018-07-111-0/+6
|
* bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091)Bradley Laney2018-07-102-3/+2
| | | Contributed by Bradley Laney.
* bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184)Dong-hee Na2018-07-101-0/+7
|
* Fixed several assertTrue() that were intended to be assertEqual(). (GH-8191)Sergey Fedoseev2018-07-095-8/+12
| | | Fixed also testing the "always" warning filter.
* bpo-33305: Improve SyntaxError for invalid numerical literals. (GH-6517)Serhiy Storchaka2018-07-091-0/+24
|
* bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684)Serhiy Storchaka2018-07-091-1/+7
|
* bpo-31014: Fix the webbrowser module. (GH-7267)Serhiy Storchaka2018-07-081-0/+19
| | | | | | | webbrowser._synthesize() called webbrowser.register() with outdated signature. Co-Authored-By: John Still <john@jmsdvl.com>
* closes bpo-34056: Always return bytes from _HackedGetData.get_data(). (GH-8130)Benjamin Peterson2018-07-071-0/+15
| | | | | | | | | | * Always return bytes from _HackedGetData.get_data(). Ensure the imp.load_source shim always returns bytes by reopening the file in binary mode if needed. Hash-based pycs have to receive the source code in bytes. It's tempting to change imp.get_suffixes() to always return 'rb' as a mode, but that breaks some stdlib tests and likely 3rdparty code, too.
* bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior ↵Ammar Askar2018-07-061-24/+47
| | | | | | | | | (GH-7891) Most of the change involves fixing up the test suite, which previously made the assumption that there wouldn't be a new line if the input didn't end in one. Contributed by Ammar Askar.
* bpo-34044: subprocess.Popen copies startupinfo (GH-8090)Victor Stinner2018-07-051-0/+27
| | | | | | | subprocess.Popen now copies the startupinfo argument to leave it unchanged: it will modify the copy, so that the same STARTUPINFO object can be used multiple times. Add subprocess.STARTUPINFO.copy() method.
* Fix fuzz testing for marshal.loads(). (GH-8106)Serhiy Storchaka2018-07-051-4/+5
|
* bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336)Serhiy Storchaka2018-07-051-6/+17
|
* bpo-32942: Fix environment dependent test_script_helper (GH-8034)Lorenz Mende2018-07-041-16/+31
| | | | Result of function interpreter_requires_environment() depends on os.environ. This was not covered by the tests, leading to fail when PYTHONHOME was set.
* bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081)Victor Stinner2018-07-041-2/+6
| | | | | | | | Fix test_forkserver_sigkill() of test_multiprocessing_forkserver: give more time to the first child process to complete, double the sleep in the parent process. Reduce also the child process sleep from 1000 ms to 500 ms, to not change the total duration of the test.
* bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918)Zackery Spytz2018-07-031-1/+16
| | | | PyErr_Print() will not return when the exception is a SystemExit, so decref the __main__ module object in that case.
* bpo-34019: Fix wrong arguments for Opera Browser (#8047)Bumsik Kim2018-07-031-8/+8
| | | | | The Opera Browser was using a outdated command line invocation that resulted in an incorrect URL being opened in the browser when requested using the webbrowser module. * Correct the arguments passed to the Opera Browser when opening a new URL.
* bpo-33735: Fix test_multiprocessing random failure (GH-8059)Victor Stinner2018-07-031-3/+3
| | | | | | | | | | | | When hunting memory leaks using -R 3:3, test_imap_unordered() of test_multiprocessing leaks randomly a few memory blocks. It is a false alarm: when testing using -R 3:20 for example, no leak is detected. Modify test_imap_unordered() to be closer to test_imap(): * Only test 10 numbers instead of 1000: it's a pool of 4 processes, so 10 is enough to test at least one number per process * Use chunksize=100 instead of chunksize=53 to mimick test_imap()
* bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008)Xtreak2018-07-021-0/+75
|
* bpo-32568: make select.epoll() and its docs consistent (#7840)Tal Einat2018-06-301-9/+16
| | | | | | | | | | | | | * `flags` is indeed deprecated, but there is a validation on its value for backwards compatibility reasons. This adds mention of this in the docs. * The docs say that `sizehint` is deprecated and ignored, but it is still used when `epoll_create1()` is unavailable. This adds mention of this in the docs. * `sizehint=-1` is acceptable again, and is replaced with `FD_SETSIZE-1`. This is needed to have a default value available at the Python level, since `FD_SETSIZE` is not exposed to Python. (see: bpo-31938) * Reject `sizehint=0` since it is invalid to pass on to `epoll_create()`. The relevant tests have also been updated.
* bpo-33974: Fix passing special characters to ttk widgets. (GH-7986)Serhiy Storchaka2018-06-301-0/+37
| | | | Fix passing lists and tuples of strings containing special characters '"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.
* bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918)Zackery Spytz2018-06-291-0/+11
|
* bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)Yury Selivanov2018-06-291-2/+22
|
* bpo-33985: Implement ContextVar.name attribute. (GH-7980)Yury Selivanov2018-06-281-2/+7
|
* bpo-33715: Fix multiprocessing test_wait_result() (GH-7971)Victor Stinner2018-06-271-2/+2
| | | Increase timeouts from 10 seconds to 1 minute.
* bpo-33913: Fix test_multiprocessing_main_handling (GH-7972)Victor Stinner2018-06-271-6/+10
| | | | | | | | | bpo-30339, bpo-33913: * Increase timeout from 10 seconds to 1 minute in test_source_main_skipped_in_children source of test_multiprocessing_main_handling. * Replace time.time() with time.monotonic(). * On timeout, include the duration in the error message.
* bpo-25007: Add copy protocol support to zlib compressors and decompressors ↵Zackery Spytz2018-06-271-24/+31
| | | | (GH-7940)
* bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)Victor Stinner2018-06-271-1/+3
| | | | | test_mymanager_context() now also accepts -SIGTERM as an expected exitcode for the manager process. The process is killed with SIGTERM if it takes longer than 1 second to stop.
* bpo-30317, test_multiprocessing: fix test_timeout() (GH-7957)Victor Stinner2018-06-271-2/+2
| | | | | | | | | | | Tolerate a different of 50 ms, instead of just 30 ms, in test_timeout() of multiprocessing tests. This change should fix such test failure on Windows: FAIL: test_timeout (test.test_multiprocessing_spawn.WithProcessesTestQueue) Traceback (most recent call last): File "lib\test\_test_multiprocessing.py", line 753, in test_timeout self.assertGreaterEqual(delta, 0.170) AssertionError: 0.16138982772827148 not greater than or equal to 0.17
* bpo-24567: Random subnormal.diff (#7954)Raymond Hettinger2018-06-271-0/+8
| | | | | Handle subnormal weights for choices()
* bpo-29514: Make magic number test work for candidatesNed Deily2018-06-271-1/+1
|
* bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` ↵Pablo Galindo2018-06-262-1/+11
| | | | | | | | parameters (GH-7735) Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs. Add check for invalid --huntrleaks/-R parameters.
* Revert "bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)" (GH-7919)Victor Stinner2018-06-2616-95/+91
| | | This reverts commit 8fbbdf0c3107c3052659e166f73990b466eacbb0.
* bpo-33897: Add a 'force' keyword argument to logging.basicConfig(). (GH-7873)Dong-hee Na2018-06-251-0/+21
|
* bpo-33805: Improve error message of dataclasses.replace() (GH-7580)Dong-hee Na2018-06-231-0/+16
|
* bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)Victor Stinner2018-06-2216-91/+95
| | | | | | | | * Add support.MS_WINDOWS: True if Python is running on Microsoft Windows. * Add support.MACOS: True if Python is running on Apple macOS. * Replace support.is_android with support.ANDROID * Replace support.is_jython with support.JYTHON * Cleanup code to initialize unix_shell
* bpo-33932: Calling Py_Initialize() twice does nothing (GH-7845)Victor Stinner2018-06-221-0/+9
| | | | Calling Py_Initialize() twice does nothing, instead of failing with a fatal error: restore the Python 3.6 behaviour.
* bpo-33912: Fix test_warnings when run with -Werror (GH-7839)Christopher Frederickson2018-06-211-0/+1
| | | Add missing warning filter to test_exec_filename().
* bpo-33716, test_concurrent_futures: increase timeout (GH-7828)Pablo Galindo2018-06-211-5/+5
| | | | | Increase the timeout from 1 min to 5 min. Replace also time.time() with time.monotonic() for timeouts.
* Fix compiling error when missing gdbm version macros (GH-7823)Xiang Zhang2018-06-202-5/+4
|
* bpo-33901: Add _gdbm._GDBM_VERSION (GH-7794)Victor Stinner2018-06-192-0/+21
| | | | | | | * Fix also PyInit__gdbm() to catch errors. * test.pythoninfo: add gdbm.version * test_dbm_gnu now logs GDBM_VERSION when run in verbose mode. * pythoninfo: rename function to collect_gdbm()
* bpo-33901: Better test_dbm_gnu.test_reorganize() fix (GH-7795)Victor Stinner2018-06-191-3/+7
| | | | Fix test_dbm_gnu.test_reorganize() on macOS with gdbm 1.15: add a larger value to make sure that the file size changes.
* bpo-33671 / shutil.copyfile: use memoryview() with dynamic size on Windows ↵Giampaolo Rodola2018-06-191-7/+81
| | | | | | | | | | (#7681) bpo-33671 * use memoryview() with size == file size on Windows, see https://github.com/python/cpython/pull/7160#discussion_r195405230 * release intermediate (sliced) memoryview immediately * replace "OSX" occurrences with "macOS" * add some unittests for copyfileobj()
* bpo-33365: print the header values beside the keys (GH-6611)Marco Strigl2018-06-191-0/+15
| | | | | with debuglevel=1 only the header keys got printed. With this change the header values get printed as well and the single header entries get '\n' as a separator.
* bpo-33901: Fix test_dbm_gnu for gdbm 1.15 (GH-7791)Victor Stinner2018-06-191-2/+2
| | | | | | Using gdbm 1.15, creating a database creates a file of 16 MiB. Adding a small entry and then modifying the small entry doesn't change the file size. Modify test_dbm_gnu to be less strict: allow that the file size doesn't change.
* Use more specific asserts in dbm tests. (GH-7786)Serhiy Storchaka2018-06-192-3/+4
| | | This may help to investigate bpo-33901.
* bpo-33843: Remove deprecated stuff in cgi module (GH-7662)INADA Naoki2018-06-191-24/+0
|
* bpo-33861: Minor improvements of tests for os.path. (GH-7715)Serhiy Storchaka2018-06-162-47/+61
| | | | | | | | * Test exists(), lexists(), isdir(), isfile(), islink(), ismount() with bytes paths. * Remove unneeded silencing DeprecationWarning for ismount() with bytes path. * Test common functions with unencodable and undecodable paths. * Minor clean up and refactoring.