Nadeem Vawda
ef0a44c629
Issue #13886 : Fix input() to not strip out supposedly-invalid input bytes.
...
Also fix sporadic failures in test_builtin due to dependence on whether the
readline module has previously been imported.
2013-01-27 14:17:21 +01:00
Nadeem Vawda
60cc32382f
Issue #13886 : Fix input() to not strip out supposedly-invalid input bytes.
...
Also fix sporadic failures in test_builtin due to dependence on whether the
readline module has previously been imported.
2013-01-27 14:13:25 +01:00
Nadeem Vawda
6f02ea02c8
Issue #13886 : Fix input() to not strip out supposedly-invalid input bytes.
...
Also fix sporadic failures in test_builtin due to dependence on whether the
readline module has previously been imported.
2013-01-27 14:01:42 +01:00
Andrew Svetlov
2cd8ce4690
Issue #9856 : Replace deprecation warinigs to raising TypeError in object.__format__
...
Patch by Florent Xicluna.
2012-12-23 14:27:17 +02:00
Andrew Svetlov
4b61d0fa7f
Issue #16045 : add more unit tests for built-in int()
...
Patch by Chris Jerdonek.
2012-12-23 12:50:02 +02:00
Andrew Svetlov
8e42e8a0c6
Issue #16045 : add more unit tests for built-in int()
...
Patch by Chris Jerdonek.
2012-12-23 12:49:33 +02:00
Benjamin Peterson
9272279afd
use error label instead of breaking eval loop ( closes #16693 )
2012-12-15 12:51:05 -05:00
Chris Jerdonek
5fae0e5854
Improve str() and object.__str__() documentation (issue #13538 ).
2012-11-20 17:45:51 -08:00
Chris Jerdonek
17fc44c9b3
Improve str() and object.__str__() documentation (issue #13538 ).
2012-11-20 17:31:02 -08:00
Florent Xicluna
3f4ce635ee
Issue #11022 and #15287 : correctly remove the TESTFN file in test_builtin.
2012-07-08 12:08:45 +02:00
Victor Stinner
f86a5e8a93
Close #11022 : TextIOWrapper doesn't call locale.setlocale() anymore
...
open() and io.TextIOWrapper are now calling locale.getpreferredencoding(False)
instead of locale.getpreferredencoding() in text mode if the encoding is not
specified. Don't change temporary the locale encoding using locale.setlocale(),
use the current locale encoding instead of the user preferred encoding.
Explain also in open() documentation that locale.getpreferredencoding(False) is
called if the encoding is not specified.
2012-06-05 13:43:22 +02:00
Victor Stinner
b0b224233e
Issue #14385 : Support other types than dict for __builtins__
...
It is now possible to use a custom type for the __builtins__ namespace, instead
of a dict. It can be used for sandboxing for example. Raise also a NameError
instead of ImportError if __build_class__ name if not found in __builtins__.
2012-04-19 00:57:45 +02:00
Kristján Valur Jónsson
31668b8f7a
Issue #14288 : Serialization support for builtin iterators.
2012-04-03 10:49:41 +00:00
Antoine Pitrou
deb925fc14
Skip early if stdin and stdout are not ttys
2011-11-06 03:04:12 +01:00
Antoine Pitrou
1ce4b14c4d
Skip early if stdin and stdout are not ttys
2011-11-06 03:03:18 +01:00
Antoine Pitrou
413d497247
Backport robustness fix for test_builtin
2011-11-06 02:51:25 +01:00
Antoine Pitrou
772add7e1a
Try to make the tty input() tests more robust
2011-11-06 02:37:42 +01:00
Antoine Pitrou
5ee9d8a8a2
Issue #13342 : input() used to ignore sys.stdin's and sys.stdout's unicode
...
error handler in interactive mode (when calling into PyOS_Readline()).
2011-11-06 00:38:45 +01:00
Antoine Pitrou
0d776b1ce8
Issue #13342 : input() used to ignore sys.stdin's and sys.stdout's unicode
...
error handler in interactive mode (when calling into PyOS_Readline()).
2011-11-06 00:34:26 +01:00
Ezio Melotti
a9860aeb08
#13054 : fix usage of sys.maxunicode after PEP-393.
2011-10-04 19:06:00 +03:00
Benjamin Peterson
18d7d7a217
also make NotImplementedType callable
2011-07-29 18:27:44 -05:00
Benjamin Peterson
c4607aeedd
make the types of None and Ellipsis callable
2011-07-29 18:19:43 -05:00
Benjamin Peterson
ce071ca4e7
bytes should be verboten in sum() ( fixes #12654 )
2011-07-29 14:23:47 -05:00
Benjamin Peterson
3bbb722654
allow __dir__ to return any sequence
2011-06-11 16:12:08 -05:00
Benjamin Peterson
dac9acedfd
test that object has a __dir__() implementation
2011-05-25 09:33:37 -05:00
Eric V. Smith
b9cd3531c4
Issue 9856: Change object.__format__ with a non-empty format string from a PendingDeprecationWarning to a DeprecationWarning.
2011-03-12 10:08:48 -05:00
Eli Bendersky
67ebabd152
Removed fcmp and FUZZ from test.support, following the discussion on python-dev:
...
http://mail.python.org/pipermail/python-dev/2011-January/107735.html
2011-02-25 10:14:17 +00:00
Georg Brandl
8334fd9285
Add an "optimize" parameter to compile() to control the optimization level, and provide an interface to it in py_compile, compileall and PyZipFile.
2010-12-04 10:26:46 +00:00
Antoine Pitrou
e71362d3de
Issue #10518 : Bring back the callable() builtin.
...
Approved by Guido (BDFL) and Georg (RM).
2010-11-27 22:00:11 +00:00
Benjamin Peterson
8d16ab3c56
merge all range tests into test_range
2010-11-20 23:01:55 +00:00
Benjamin Peterson
94ab7a0864
enable test that was commented out for whatever reason
2010-11-20 22:50:04 +00:00
Benjamin Peterson
0b458d52f9
count() should return integers #10474
2010-11-20 22:35:41 +00:00
Ezio Melotti
b3aedd4862
#9424 : Replace deprecated assert* methods in the Python test suite.
2010-11-20 19:04:17 +00:00
Daniel Stutzbach
9f0cbf1c72
Issue #9213 : Add index and count methods to range objects, needed to
...
meet the API of the collections.Sequence ABC.
2010-09-13 21:16:29 +00:00
Eric Smith
e4d6317c87
Issue 7994: Make object.__format__() raise a PendingDeprecationWarning
...
if the format string is not empty. Manually merge r79596 and r84772
from 2.x.
Also, apparently test_format() from test_builtin never made it into
3.x. I've added it as well. It tests the basic format()
infrastructure.
2010-09-13 20:48:43 +00:00
Antoine Pitrou
e4a189274f
Issue #9804 : ascii() now always represents unicode surrogate pairs as
...
a single `\UXXXXXXXX`, regardless of whether the character is printable
or not. Also, the "backslashreplace" error handler now joins surrogate
pairs into a single character on UCS-2 builds.
2010-09-09 20:30:23 +00:00
Benjamin Peterson
17689991e6
only catch AttributeError in hasattr() #9666
2010-08-24 03:26:23 +00:00
Benjamin Peterson
076e031e54
cleanup imports
2010-08-23 21:58:59 +00:00
Alexander Belopolsky
e29e6bffb5
Issue #665761 : functools.reduce() will no longer mask exceptions other
...
than TypeError raised by the iterator argument. Also added a test to
check that zip() already behaves similarly.
2010-08-16 18:55:46 +00:00
Mark Dickinson
fb3dc94b8c
Merged revisions 81525 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81525 | mark.dickinson | 2010-05-25 20:01:08 +0100 (Tue, 25 May 2010) | 3 lines
Issue #8816 : Extra tests for some built-in functions. These tests are
ports of IronPython tests. Thanks Gregory Nofi.
........
2010-05-25 19:06:24 +00:00
Mark Dickinson
85b53533e4
Issue #1533 : Merge added trunk range tests to py3k. (The fix itself
...
doesn't need to be merged.) Patch by Alexander Belopolsky.
2010-05-05 22:39:58 +00:00
Brett Cannon
776289934c
Clean up the manipulation of the warnings filter in test_builtin.
2010-03-20 20:59:33 +00:00
Georg Brandl
1b37e8728c
Merged revisions 78093 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78093 | georg.brandl | 2010-02-07 18:03:15 +0100 (So, 07 Feb 2010) | 1 line
Remove unused imports in test modules.
........
2010-03-14 10:45:50 +00:00
Victor Stinner
624dbf6220
Issue #6697 : catch _PyUnicode_AsString() errors in getattr() and setattr()
...
builtin functions.
2010-03-12 17:17:58 +00:00
Benjamin Peterson
577473fe68
use assert[Not]In where appropriate
...
A patch from Dave Malcolm.
2010-01-19 00:09:57 +00:00
Mark Dickinson
5c2db37c20
Issue #7435 : Remove duplicate int/long tests, and other
...
references to long in py3k. Patch provided by flox.
2009-12-05 20:28:34 +00:00
Mark Dickinson
ad731b9af9
Merged revisions 76176 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76176 | mark.dickinson | 2009-11-09 17:03:34 +0000 (Mon, 09 Nov 2009) | 7 lines
Issue #7251 : Break out round tests for large values into a separate
test function, and skip that test on Linux/alpha systems with a broken
system round function.
This should turn the Debian/alpha buildbot green.
........
2009-11-09 17:12:30 +00:00
Mark Dickinson
3a22b476a3
Merged revisions 75470 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75470 | mark.dickinson | 2009-10-17 22:46:32 +0100 (Sat, 17 Oct 2009) | 1 line
Protect against attempts to replace PyNumber_Add with PyNumber_InPlaceAdd in builtin sum
........
2009-10-17 21:48:16 +00:00
Georg Brandl
953152f064
Merged revisions 74167 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74167 | georg.brandl | 2009-07-22 13:57:15 +0200 (Mi, 22 Jul 2009) | 1 line
Issue #6540 : Fixed crash for bytearray.translate() with invalid parameters.
........
2009-07-22 12:03:59 +00:00
Benjamin Peterson
c9c0f201fe
convert old fail* assertions to assert*
2009-06-30 23:06:06 +00:00