summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35133: Fix mistakes when concatenate string literals on different lines. ↵Serhiy Storchaka2018-11-051-1/+1
| | | | | | | | | | (GH-10284) Two kind of mistakes: 1. Missed space. After concatenating there is no space between words. 2. Missed comma. Causes unintentional concatenating in a list of strings.
* bpo-34320: Fix dict(o) didn't copy order of dict subclass (GH-8624)INADA Naoki2018-09-261-0/+9
| | | | | | | When dict subclass overrides order (`__iter__()`, `keys()`, and `items()`), `dict(o)` should use it instead of dict ordering. https://bugs.python.org/issue34320
* bpo-34637: Make the *start* argument for *sum()* visible as a keyword ↵Raymond Hettinger2018-09-121-0/+3
| | | | argument. (GH-9208)
* bpo-34149: Behavior of the min/max with key=None (GH-8328)Alexander Marshalov2018-07-241-0/+4
| | | Improve consistency with the signature for sorted(), heapq.nsmallest(), heapq.nlargest(), and itertools.groupby().
* bpo-27169: The __debug__ constant is now optimized out at compile time. (#4880)Serhiy Storchaka2017-12-151-8/+8
| | | This fixes also bpo-22091.
* bpo-29240: PEP 540: Add a new UTF-8 Mode (#855)Victor Stinner2017-12-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | * Add -X utf8 command line option, PYTHONUTF8 environment variable and a new sys.flags.utf8_mode flag. * If the LC_CTYPE locale is "C" at startup: enable automatically the UTF-8 mode. * Add _winapi.GetACP(). encodings._alias_mbcs() now calls _winapi.GetACP() to get the ANSI code page * locale.getpreferredencoding() now returns 'UTF-8' in the UTF-8 mode. As a side effect, open() now uses the UTF-8 encoding by default in this mode. * Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding in the UTF-8 Mode. * Update subprocess._args_from_interpreter_flags() to handle -X utf8 * Skip some tests relying on the current locale if the UTF-8 mode is enabled. * Add test_utf8mode.py. * _Py_DecodeUTF8_surrogateescape() gets a new optional parameter to return also the length (number of wide characters). * pymain_get_global_config() and pymain_set_global_config() now always copy flag values, rather than only copying if the new value is greater than the old value.
* PEP 553 built-in breakpoint() function (bpo-31353) (#3355)Barry Warsaw2017-10-051-1/+109
| | | Implement PEP 553, built-in breakpoint() with support from sys.breakpointhook(), along with documentation and tests. Closes bpo-31353
* bpo-31657: Add test coverage for the __debug__ case (GH-3450)diana2017-10-031-8/+11
| | | | | | Update the compile tests for optimization levels to also check that __debug__ blocks are included or excluded based on the optimization level. Patch by Diana Clarke.
* bpo-31160: test_builtin: don't check waitpid() status (#3050)Victor Stinner2017-08-091-2/+2
|
* bpo-31160: Fix test_builtin for zombie process (#3043)Victor Stinner2017-08-091-0/+4
| | | | | PtyTests.run_child() now calls os.waitpid() to read the exit status of the child process to avoid creating zombie process and leaking processes in the background.
* [security] bpo-13617: Reject embedded null characters in wchar* strings. (#2302)Serhiy Storchaka2017-06-281-0/+6
| | | | | | | Based on patch by Victor Stinner. Add private C API function _PyUnicode_AsUnicode() which is similar to PyUnicode_AsUnicode(), but checks for null characters.
* bpo-29839: Raise ValueError rather than OverflowError in len() for negative ↵Serhiy Storchaka2017-04-161-0/+8
| | | | values. (#701)
* bpo-29919: Remove unused imports found by pyflakes (#137)Victor Stinner2017-03-271-1/+1
| | | Make also minor PEP8 coding style fixes on modified imports.
* Issue #29327: Fixed a crash when pass the iterable keyword argument to sorted().Serhiy Storchaka2017-01-201-0/+10
|
* Issue #28385: An error message when non-empty format spec is passed toSerhiy Storchaka2016-10-301-13/+11
|\ | | | | | | object.__format__ now contains the name of actual type.
| * Issue #28385: An error message when non-empty format spec is passed toSerhiy Storchaka2016-10-301-13/+11
| | | | | | | | object.__format__ now contains the name of actual type.
* | Issue #24254: Drop cls.__definition_order__.Eric Snow2016-09-081-191/+1
| |
* | #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-2/+2
| | | | | | | | | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* | Issue #24254: Preserve class attribute definition order.Eric Snow2016-09-051-1/+191
| |
* | MergeRaymond Hettinger2016-09-031-0/+11
|\ \ | |/
| * Issue 27936: Fix inconsistent round() behavior between float and intRaymond Hettinger2016-09-031-0/+11
| |
* | Issue #27366: Implement PEP 487Nick Coghlan2016-07-301-15/+5
|/ | | | | | - __init_subclass__ called when new subclasses defined - __set_name__ called when descriptors are part of a class definition
* Issue #25983: Added tests for multi-argument type().Serhiy Storchaka2016-02-081-0/+155
|
* Issue #24402: Merge potential test fix from 3.4 into 3.5Martin Panter2015-10-101-45/+48
|\
| * Issue #24402: Factor out PtyTests.run_child() in input() testsMartin Panter2015-10-101-45/+48
| | | | | | | | | | | | This reuses existing code to hopefully make the new test_input_no_stdout_ fileno() test work. It is hanging Free BSD 9 and OS X Tiger buildbots, and I don't know why.
* | Issue #24402: Merge input() fix from 3.4 into 3.5Martin Panter2015-10-101-76/+110
|\ \ | |/
| * Issue #24402: Fix input() when stdout.fileno() fails; diagnosed by EryksunMartin Panter2015-10-101-76/+110
| | | | | | | | Also factored out some test cases into a new PtyTests class.
* | Issue #9517: Move script_helper to the support package.Berker Peksag2015-05-061-1/+1
| | | | | | | | Patch by Christie Wilson.
* | Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-11/+14
|\ \ | |/
| * Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-11/+14
| |
| * Issue #20599: Don't clear environment in test_cleanup() of test_builtinVictor Stinner2014-02-131-2/+1
| |
| * Issue #20599: Force ASCII encoding for stdout in test_cleanup() of test_builtinVictor Stinner2014-02-121-3/+11
| | | | | | | | | | | | On Windows, the codec of sys.stdout is implemented in Python. At exit, the codec may be unloaded before the destructor tries to write something to sys.stdout.
| * Try to fix test_cleanup (issue #20599).Serhiy Storchaka2014-02-121-2/+2
| |
| * Issue #19255: The builtins module is restored to initial value beforeSerhiy Storchaka2014-02-101-0/+29
| | | | | | | | cleaning other modules. The sys and builtins modules are cleaned last.
* | Issue #22215: Now ValueError is raised instead of TypeError when str or bytesSerhiy Storchaka2014-09-061-2/+2
| | | | | | | | argument contains not permitted null character or byte.
* | test the change of #21193 correctlyBenjamin Peterson2014-04-111-2/+2
| |
* | Issue #21193: Make (e.g.,) pow(2, -3, 5) raise ValueError rather than ↵Mark Dickinson2014-04-111-1/+1
| | | | | | | | TypeError. Patch by Josh Rosenberg.
* | Issue #20599: Don't clear environment in test_cleanup() of test_builtinVictor Stinner2014-02-131-2/+1
| |
* | Issue #20599: Force ASCII encoding for stdout in test_cleanup() of test_builtinVictor Stinner2014-02-121-3/+11
| | | | | | | | | | | | On Windows, the codec of sys.stdout is implemented in Python. At exit, the codec may be unloaded before the destructor tries to write something to sys.stdout.
* | Try to fix test_cleanup (issue #20599).Serhiy Storchaka2014-02-121-2/+2
| |
* | Issue #19255: The builtins module is restored to initial value beforeSerhiy Storchaka2014-02-101-0/+29
|/ | | | cleaning other modules. The sys and builtins modules are cleaned last.
* Issue #3158: doctest can now find doctests in functions and methodsZachary Ware2013-11-241-16/+5
| | | | | | | | written in C. As a part of this, a few doctests have been added to the builtins module (on hex(), oct(), and bin()), a doctest has been fixed (hopefully on all platforms) on float, and test_builtins now runs doctests in builtins.
* Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-0/+5
| | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* Cleanup test_builtinVictor Stinner2013-08-211-12/+4
|
* Issue 18111: Add a default argument to min() and max()Raymond Hettinger2013-06-251-0/+28
|
* Make test_builtin work when executed directlyBrett Cannon2013-06-161-1/+4
|
* Revert a premature patch for issue #14010 (changeset 846bd418aee5).Serhiy Storchaka2013-04-061-33/+1
|\
| * Revert a premature patch for issue #14010 (changeset aaaf36026511).Serhiy Storchaka2013-04-061-33/+1
| |
* | Issue #14010: Fix a crash when iterating or deleting deeply nested filtersSerhiy Storchaka2013-04-061-1/+33
|\ \ | |/ | | | | (builting and in itertools module, i.e. map(), itertools.chain(), etc).
| * Issue #14010: Fix a crash when iterating or deleting deeply nested filtersSerhiy Storchaka2013-04-061-1/+33
| | | | | | | | (builting and in itertools module, i.e. map(), itertools.chain(), etc).