summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30095: Make CSS classes used by calendar.HTMLCalendar customizable (GH-1439)Oz N Tiram2017-06-061-30/+78
| | | Several class attributes have been added to calendar.HTMLCalendar that allow customization of the CSS classes used in the resulting HTML. This can be done by subclasses HTMLCalendar and overwriting those class attributes (Patch by Oz Tiram).
* bpo-30557: faulthandler now correctly filters and displays exception codes ↵Steve Dower2017-06-051-0/+26
| | | | | | | | | | on Windows (#1924) * bpo-30557: faulthandler now correctly filters and displays exception codes on Windows * Adds test for non-fatal exceptions. * Adds bpo number to comment.
* Fix bpo-30526: Add TextIOWrapper.reconfigure() and a ↵Antoine Pitrou2017-06-031-0/+51
| | | | | | | | | | TextIOWrapper.write_through attribute (#1922) * Fix bpo-30526: Add TextIOWrapper.reconfigure() * Apply Nick's improved wording * Update Misc/NEWS
* Fix skipping test_UNC_path on AppVeyor due to a different error being raised ↵Segev Finer2017-06-021-1/+1
| | | | | | (#1920) We get `ERROR_BAD_NETPATH` (53) on AppVeyor which is translated to ENOENT (2).
* bpo-30245: Fix possible overflow when organize struct.pack_into error ↵Johan Liu2017-06-021-0/+10
| | | | message (#1682)
* bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses ↵Xiang Zhang2017-06-011-2/+20
| | | | (#1676)
* bpo-25324: copy tok_name before changing it (#1608)Albert-Jan Nijburg2017-05-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | * add test to check if were modifying token * copy list so import tokenize doesnt have side effects on token * shorten line * add tokenize tokens to token.h to get them to show up in token * move ERRORTOKEN back to its previous location, and fix nitpick * copy comments from token.h automatically * fix whitespace and make more pythonic * change to fix comments from @haypo * update token.rst and Misc/NEWS * change wording * some more wording changes
* subprocess test_empty_env typo fix. (#1877)Gregory P. Smith2017-05-301-3/+3
|
* bpo-12383: Refactor subprocess test_empty_env (#1874)Gregory P. Smith2017-05-301-12/+20
| | | | | | | | | | | | Bugfix: This test wasn't being run because it was skipping based on the presence of Py_ENABLE_SHARED rather than its value. It is always present on POSIX systems but defaults to 0. Refactoring: Move the environment variables that can be ignored into a function. Parse the list from the child process and filter out the ones to exclude in the parent before checking that the rest is empty. Feature: Adds always present environment variables to ignore when running in a Gentoo sandbox so that the test can pass there.
* bpo-16500: Don't use string constants for os.register_at_fork() behavior (#1834)Gregory P. Smith2017-05-291-7/+29
| | | | Instead use keyword only arguments to os.register_at_fork for each of the scenarios. Updates the documentation for clarity.
* bpo-16500: Allow registering at-fork handlers (#1715)Antoine Pitrou2017-05-272-0/+59
| | | | | | | | | | | | * bpo-16500: Allow registering at-fork handlers * Address Serhiy's comments * Add doc for new C API * Add doc for new Python-facing function * Add NEWS entry + doc nit
* bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc ↵grzgrzgrz32017-05-251-0/+14
| | | | | | | | | | | | | | | | | | (#1683) * bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc Queue background running thread was not handling exceptions correctly. Any exception occurred inside thread (putting unpickable object) cause feeder to finish running. After that every message put into queue is silently ignored. * bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc Queue background running thread was not handling exceptions correctly. Any exception occurred inside thread (putting unpickable object) cause feeder to finish running. After that every message put into queue is silently ignored.
* bpo-29104: Fixed parsing backslashes in f-strings. (#490)Serhiy Storchaka2017-05-251-0/+14
|
* bpo-30447: Fix/skip the subinterpreters test on some platforms. (#1791)Eric Snow2017-05-251-43/+42
|
* bpo-29851: Have importlib.reload() raise ImportError if the module's spec is ↵Garvit Khatri2017-05-241-2/+12
| | | | not found (GH-972)
* bpo-30445: Allow appended output in RecursionError messagecodedragon2017-05-241-1/+2
| | | | | Running under coverage sometimes causes 'in comparison' to be added to the end of the RecursionError message, which is acceptable. Patched by Maria Mckinley
* bpo-30442: Skips refcount test in test_xml_etree under coverage (#1767)Kushal Das2017-05-241-0/+1
|
* bpo-30377: Simplify handling of COMMENT and NL in tokenize.py (#1607)Albert-Jan Nijburg2017-05-241-7/+9
|
* bpo-28707: Add the directory parameter to ↵Stéphane Wirtel2017-05-241-1/+6
| | | | | | | | http.server.SimpleHTTPRequestHandler and http.server module (#1776) * bpo-28707: call the constructor of SimpleHTTPRequestHandler in the test with a mock object * bpo-28707: Add the directory parameter to http.server.SimpleHTTPRequestHandler and http.server module
* Revert an invalid change to a test (from 6b4be19). (#1770)Eric Snow2017-05-231-4/+4
|
* Improves test_underpth_nosite_file to reveal why it fails. (#1763)Steve Dower2017-05-231-6/+10
| | | | | | | | | | | | | | * Improves test_underpth_nosite_file to reveal why it fails. * Enable building with Windows 10 SDK. * Fix WinSDK detection * Fix initialization on Windows when a ._pth file exists. * Fix tabs * Adds comment about Py_GetPath call.
* bpo-29335 - apply suggested test_subprocess simplifications from haypo and ↵Gregory P. Smith2017-05-231-9/+5
| | | | | Zach: (#1757) use faulthandler._sigsegv() and ctypes.util.find_library('c')
* bpo-30432: FileInput doesn't accept PathLike objects for file names (#1732)Roy Williams2017-05-231-0/+15
| | | | | | | | | | * Allow FileInput to accept a single PathLike object as a parameter for `files` Fixes bpo-30432: FileInput doesn't accept PathLike objects for file names * Address comments from @ambv
* bpo-22257: Small changes for PEP 432. (#1728)Eric Snow2017-05-233-8/+32
| | | PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes.
* bpo-25532: Protect against infinite loops in inspect.unwrap() (#1717)Thomas Kluyver2017-05-231-0/+18
| | | | | | | | | Some objects (like test mocks) auto-generate new objects on attribute access, which can lead to an infinite loop in inspect.unwrap(). Ensuring references are retained to otherwise temporary objects and capping the size of the memo dict turns this case into a conventional exception instead.
* bpo-29102: Add a unique ID to PyInterpreterState. (#1639)Eric Snow2017-05-231-5/+86
|
* bpo-30003: Fix handling escape characters in HZ codec (#1556)Xiang Zhang2017-05-221-0/+4
|
* bpo-30415: Add new tests for the fnmatch module. (#1684)Serhiy Storchaka2017-05-211-9/+55
|
* bpo-27945: Fixed various segfaults with dict. (#1657)Serhiy Storchaka2017-05-201-0/+85
| | | | Based on patches by Duane Griffin and Tim Mitchell.
* bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (#1652)Serhiy Storchaka2017-05-201-0/+27
| | | | Based on patch by Eryk Sun.
* bpo-27103: regrtest disables -W if -R is used (#1651)Victor Stinner2017-05-181-0/+5
| | | Workaround for a regrtest bug.
* bpo-30039: Don't run signal handlers while resuming a yield from stack (#1081)Nathaniel J. Smith2017-05-171-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a chain of generators/coroutines that are 'yield from'ing each other, then resuming the stack works like: - call send() on the outermost generator - this enters _PyEval_EvalFrameDefault, which re-executes the YIELD_FROM opcode - which calls send() on the next generator - which enters _PyEval_EvalFrameDefault, which re-executes the YIELD_FROM opcode - ...etc. However, every time we enter _PyEval_EvalFrameDefault, the first thing we do is to check for pending signals, and if there are any then we run the signal handler. And if it raises an exception, then we immediately propagate that exception *instead* of starting to execute bytecode. This means that e.g. a SIGINT at the wrong moment can "break the chain" – it can be raised in the middle of our yield from chain, with the bottom part of the stack abandoned for the garbage collector. The fix is pretty simple: there's already a special case in _PyEval_EvalFrameEx where it skips running signal handlers if the next opcode is SETUP_FINALLY. (I don't see how this accomplishes anything useful, but that's another story.) If we extend this check to also skip running signal handlers when the next opcode is YIELD_FROM, then that closes the hole – now the exception can only be raised at the innermost stack frame. This shouldn't have any performance implications, because the opcode check happens inside the "slow path" after we've already determined that there's a pending signal or something similar for us to process; the vast majority of the time this isn't true and the new check doesn't run at all.
* bpo-30149: Fix partialmethod without explicit self parameter (#1308)Dong-hee Na2017-05-171-0/+35
|
* bpo-30387: Fix warning in test_threading (#1634)Victor Stinner2017-05-171-3/+5
| | | | | | | | | test_is_alive_after_fork() now joins directly the thread to avoid the following warning added by bpo-30357: Warning -- threading_cleanup() failed to cleanup 0 threads after 2 sec (count: 0, dangling: 21) Use also a different exit code to catch generic exit code 1.
* bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601)Xiang Zhang2017-05-171-0/+36
| | | | | Under *spawn* and *forkserver* start methods, SimpleQueue.empty() could raise AttributeError due to not setting _poll in __setstate__.
* bpo-30375: Correct the stacklevel of regex compiling warnings. (#1595)Serhiy Storchaka2017-05-161-3/+14
| | | | | | Warnings emitted when compile a regular expression now always point to the line in the user code. Previously they could point into inners of the re module if emitted from inside of groups or conditionals.
* Remove unused variable in test_urllibnet. (#1598)Senthil Kumaran2017-05-161-1/+3
|
* bpo-30339: test_multiprocessing_main_handling timeout (#1593)Victor Stinner2017-05-151-1/+1
| | | | | test_multiprocessing_main_handling: increase the test_source timeout from 10 seconds to 60 seconds, since the test fails randomly on busy buildbots.
* bpo-30357: test_thread now uses threading_cleanup() (#1592)Victor Stinner2017-05-151-0/+4
| | | | | | | test_thread: setUp() now uses support.threading_setup() and support.threading_cleanup() to wait until threads complete to avoid random side effects on following tests. Co-Authored-By: Grzegorz Grzywacz <grzegorz.grzywacz@nazwa.pl>
* bpo-29196: Removed old-deprecated classes Plist, Dict and _InternalDict (#488)Serhiy Storchaka2017-05-151-8/+7
| | | | | in the plistlib module. Dict values in the result of functions readPlist() and readPlistFromBytes() are now exact dicts.
* bpo-9850: Deprecate the macpath module (#1540)Victor Stinner2017-05-151-1/+7
| | | Co-Authored-By: Chi Hsuan Yen <yan12125@gmail.com>.
* bpo-30110: fix resource leak in test_asyncio.test_events (#1413)Xiang Zhang2017-05-151-1/+3
|
* bpo-29763: Clean up _pth tests (GH-954)Zachary Ware2017-05-141-46/+31
|
* bpo-30299: Display a bytecode when compile a regex in debug mode. (#1491)Serhiy Storchaka2017-05-141-0/+27
| | | | | `re.compile(..., re.DEBUG)` now displays the compiled bytecode in human readable form.
* bpo-30340: Enhanced regular expressions optimization. (#1542)Serhiy Storchaka2017-05-141-14/+12
| | | | This increased the performance of matching some patterns up to 25 times.
* bpo-30308: Code coverage for argument in random.shuffle (#1504)csabella2017-05-111-1/+11
| | | | | | | | * bpo-30308: Code coverage for argument in random.shuffle * bpo-30308: Code coverage for argument in random.shuffle * bpo-30308: Code coverage for argument in random.shuffle
* bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1097)INADA Naoki2017-05-111-0/+18
| | | | | | | | | | | | when there are no more `await` or `yield (from)` before return in coroutine, cancel was ignored. example: async def coro(): asyncio.Task.current_task().cancel() return 42 ... res = await coro() # should raise CancelledError
* bpo-30298: Weaken the condition of deprecation warnings for inline ↵Serhiy Storchaka2017-05-101-14/+45
| | | | | | | | modifiers. (#1490) Now allowed several subsequential inline modifiers at the start of the pattern (e.g. '(?i)(?s)...'). In verbose mode whitespaces and comments now are allowed before and between inline modifiers (e.g. '(?x) (?i) (?s)...').
* bpo-30320: test_eintr now uses pthread_sigmask() (#1523)Victor Stinner2017-05-101-35/+26
| | | | | | | | | | | | Rewrite sigwaitinfo() and sigtimedwait() unit tests for EINTR using pthread_sigmask() to fix a race condition between the child and the parent process. Remove the pipe which was used as a weak workaround against the race condition. sigtimedwait() is now tested with a child process sending a signal instead of testing the timeout feature which is more unstable (especially regarding to clock resolution depending on the platform).
* bpo-30285: Optimize case-insensitive matching and searching (#1482)Serhiy Storchaka2017-05-091-0/+9
| | | | of regular expressions.