summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bytes.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #9530: Fix undefined-behaviour-inducing overflow checks in bytes and ↵Mark Dickinson2010-08-101-2/+4
| | | | bytearray implementations.
* Issue #8485: PyUnicode_FSConverter() doesn't accept bytearray object anymore,Victor Stinner2010-04-221-7/+0
| | | | you have to convert your bytearray filenames to bytes
* Merged revisions 80126 via svnmerge fromBenjamin Peterson2010-04-161-0/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80126 | benjamin.peterson | 2010-04-16 17:35:38 -0500 (Fri, 16 Apr 2010) | 1 line have a clear error when passing something > sys.maxsize to bytearray ........
* Merged revisions 80123-80124 via svnmerge fromBenjamin Peterson2010-04-161-8/+8
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80123 | benjamin.peterson | 2010-04-16 17:24:16 -0500 (Fri, 16 Apr 2010) | 1 line bytearray -> type2test ........ r80124 | benjamin.peterson | 2010-04-16 17:25:57 -0500 (Fri, 16 Apr 2010) | 1 line fix typo ........
* Clean up warnings filter use in test_bytes.Brett Cannon2010-03-201-42/+41
|
* Merged revisions 79100 via svnmerge fromFlorent Xicluna2010-03-191-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79100 | florent.xicluna | 2010-03-19 19:34:55 +0100 (ven, 19 mar 2010) | 2 lines Various tests cleanup: check_warnings/check_py3k_warnings, unittest.assert* and setUp/tearDown. ........
* Merged revisions 77821 via svnmerge fromMark Dickinson2010-01-291-1/+1
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77821 | mark.dickinson | 2010-01-29 17:11:39 +0000 (Fri, 29 Jan 2010) | 3 lines Issue #7788: Fix a crash produced by deleting a list slice with huge step value. Patch by Marcin Bachry. ........
* Merged revisions 77727 via svnmerge fromEzio Melotti2010-01-241-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77727 | ezio.melotti | 2010-01-24 18:58:36 +0200 (Sun, 24 Jan 2010) | 1 line use assert[Not]IsInstance where appropriate ........
* use assert[Not]In where appropriateEzio Melotti2010-01-231-6/+5
|
* use assert[Not]In where appropriateBenjamin Peterson2010-01-191-9/+9
| | | | A patch from Dave Malcolm.
* Merged revisions 77573 via svnmerge fromAntoine Pitrou2010-01-171-0/+8
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77573 | antoine.pitrou | 2010-01-17 13:26:20 +0100 (dim., 17 janv. 2010) | 6 lines Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`) could crash in many places because of the PyByteArray_AS_STRING() macro returning NULL. The macro now returns a statically allocated empty string instead. ........
* Merged revisions 77475 via svnmerge fromAntoine Pitrou2010-01-131-1/+7
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77475 | antoine.pitrou | 2010-01-13 16:02:13 +0100 (mer., 13 janv. 2010) | 4 lines Issue #7625: Add more tests that bytearray methods return new objects, even if identical. Patch by Florent Xicluna (again). ........
* Merged revisions 77448 via svnmerge fromAntoine Pitrou2010-01-121-9/+6
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77448 | antoine.pitrou | 2010-01-12 23:02:10 +0100 (mar., 12 janv. 2010) | 3 lines Issue #7654: enable additional bytes/bytearray tests. Patch by Florent Xicluna. ........
* Issue #7382: Fix bytes.__getnewargs__.Alexandre Vassalotti2010-01-121-19/+40
|
* Fix test skipping in multibyte codec testsAntoine Pitrou2009-11-011-1/+1
|
* Issue #7065: Fix a crash in bytes.maketrans and bytearray.maketrans whenAntoine Pitrou2009-10-141-8/+6
| | | | using byte values greater than 127. Patch by egreen.
* Merged revisions 74929 via svnmerge fromBenjamin Peterson2009-09-181-0/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74929 | benjamin.peterson | 2009-09-18 16:14:55 -0500 (Fri, 18 Sep 2009) | 1 line add keyword arguments support to str/unicode encode and decode #6300 ........
* Merged revisions 74673 via svnmerge fromMark Dickinson2009-09-061-0/+2
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74673 | mark.dickinson | 2009-09-06 11:03:31 +0100 (Sun, 06 Sep 2009) | 3 lines Issue #6846: bytearray.pop was returning ints in the range [-128, 128) instead of [0, 256). Thanks Hagen Fürstenau for the report and fix. ........
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-56/+56
|
* Issue #3672: Reject surrogates in utf-8 codec; add surrogates errorMartin v. Löwis2009-05-021-2/+2
| | | | handler.
* Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecateGeorg Brandl2009-04-121-0/+7
| | | | string.maketrans() which actually works on bytes. (Also closes #5675.)
* #4759: allow None as first argument of bytearray.translate(), for ↵Georg Brandl2008-12-281-0/+10
| | | | | | consistency with bytes.translate(). Also fix segfault for bytearray.translate(x, None) -- will backport this part to 3.0 and 2.6.
* Issue #4509: bugs in bytearray with exports (buffer protocol)Antoine Pitrou2008-12-061-0/+31
|
* Merged revisions 67295,67301-67302,67318,67330,67342-67343 via svnmerge fromAmaury Forgeot d'Arc2008-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67295 | benjamin.peterson | 2008-11-20 05:05:12 +0100 (jeu., 20 nov. 2008) | 1 line move useful sys.settrace information to the function's documentation from the debugger ........ r67301 | benjamin.peterson | 2008-11-20 22:25:31 +0100 (jeu., 20 nov. 2008) | 1 line fix indentation and a sphinx warning ........ r67302 | benjamin.peterson | 2008-11-20 22:44:23 +0100 (jeu., 20 nov. 2008) | 1 line oops! didn't mean to disable that test ........ r67318 | amaury.forgeotdarc | 2008-11-21 23:05:48 +0100 (ven., 21 nov. 2008) | 4 lines #4363: Let uuid.uuid1() and uuid.uuid4() run even if the ctypes module is not present. Will backport to 2.6 ........ r67330 | georg.brandl | 2008-11-22 09:34:14 +0100 (sam., 22 nov. 2008) | 2 lines #4364: fix attribute name on ctypes object. ........ r67342 | amaury.forgeotdarc | 2008-11-22 20:39:38 +0100 (sam., 22 nov. 2008) | 3 lines yuvconvert.c is a part of the "sv" module, an old IRIX thing and certainly not useful for any Windows build. ........ r67343 | amaury.forgeotdarc | 2008-11-22 21:01:18 +0100 (sam., 22 nov. 2008) | 5 lines #3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter from stack overflow. But doing this, it always crashes when the stack is nearly full. Reviewed by Martin von Loewis. Will backport to 2.6. ........
* Merged revisions 67291 via svnmerge fromBenjamin Peterson2008-11-191-0/+10
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67291 | benjamin.peterson | 2008-11-19 15:49:09 -0600 (Wed, 19 Nov 2008) | 5 lines make sure that bytearray methods return a new bytearray even if there is no change Fixes #4348 Reviewed by Brett ........
* Issue #4183: Some tests didn't run with pickle.HIGHEST_PROTOCOL.Hirokazu Yamamoto2008-10-231-2/+2
| | | | Reviewed by Benjamin Peterson.
* STINNER Victor (haypo)'s patch for bug 3988, Byte warning mode and b'' != ''Barry Warsaw2008-10-171-0/+12
| | | | Also, his patch to runtests.sh to pass the -bb option (issue 4125).
* make bytes(o) respect __bytes__ #2415Benjamin Peterson2008-08-261-0/+12
| | | | | | This adds two new C-API functions: PyObject_Bytes and PyBytes_FromObject. Reviewer: Barry
* #2834: Change re module semantics, so that str and bytes mixing is forbidden,Antoine Pitrou2008-08-191-1/+1
| | | | | and str (unicode) patterns get full unicode matching by default. The re.ASCII flag is also introduced to ask for ASCII matching instead.
* Issue #3571: test_bytes mistakingly closed stdinAntoine Pitrou2008-08-161-1/+2
|
* #2538: bytes objects can only provide read-only buffersAntoine Pitrou2008-08-021-0/+5
|
* Merged revisions 65041 via svnmerge fromGeorg Brandl2008-07-161-15/+23
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65041 | georg.brandl | 2008-07-17 00:57:41 +0200 (Thu, 17 Jul 2008) | 3 lines #3156: fix consistency in what type bytearray methods accept as items. Also rename confusing "item" parameters to "index". ........
* Add test case for r63810.Georg Brandl2008-05-301-0/+5
|
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-8/+8
|
* Enabled fromhex('') test for bytesChristian Heimes2008-01-301-3/+1
|
* Removed unused importChristian Heimes2008-01-301-1/+0
|
* Patch #1972 by Antoine Pitrou: improve bytes and bytearray testsChristian Heimes2008-01-301-436/+470
|
* Fixed #1969: split and rsplit in bytearray are inconsistentChristian Heimes2008-01-301-1/+10
|
* Removed PyInt_GetMax and sys.maxintChristian Heimes2007-12-041-11/+11
| | | | | I replaced sys.maxint with sys.maxsize in Lib/*.py. Does anybody see a problem with the change on Win 64bit platforms? Win 64's long is just 32bit but the sys.maxsize is now 2**63-1 on every 64bit platform. Also added docs for sys.maxsize.
* Issue #1283: Allow any iterable of integers to be passed toAlexandre Vassalotti2007-12-041-0/+18
| | | | bytearray.extend().
* Removed some leftovers from the str8 daysChristian Heimes2007-11-221-3/+0
|
* Rename buffer -> bytearray.Guido van Rossum2007-11-211-158/+158
|
* Merging the py3k-pep3137 branch back into the py3k branch.Guido van Rossum2007-11-061-203/+258
| | | | | | | | | | | | | | No detailed change log; just check out the change log for the py3k-pep3137 branch. The most obvious changes: - str8 renamed to bytes (PyString at the C level); - bytes renamed to buffer (PyBytes at the C level); - PyString and PyUnicode are no longer compatible. I.e. we now have an immutable bytes type and a mutable bytes type. The behavior of PyString was modified quite a bit, to make it more bytes-like. Some changes are still on the to-do list.
* Patch 1171 by mfenniak -- allow subclassing of bytes.Guido van Rossum2007-11-031-2/+81
| | | | | I suspect this has some problems when the subclass is evil, but that's for later.
* Sort the method lists for str8 and bytes so differences are more apparent.Guido van Rossum2007-10-261-12/+10
| | | | | Changed bytes.fromhex to take a str argument, as the docstring promises. Added str8.fromhex (untested so far).
* Patch #1303: Adapt str8 constructor to bytes (now buffer) one.Georg Brandl2007-10-241-31/+31
|
* Patch 1280, by Alexandre Vassalotti.Guido van Rossum2007-10-191-1/+1
| | | | | Make PyString's indexing and iteration return integers. (I changed a few of Alexandre's decisions -- GvR.)
* For PEP3137: Adds missing methods to the mutable PyBytes object (soonGregory P. Smith2007-10-161-10/+38
| | | | | | | | to be called a buffer). Shares code with stringobject when possible. Adds unit tests with common code that should be usable to test the PEPs mutable buffer() and immutable bytes() types. http://bugs.python.org/issue1261
* Patch #1049 by Thomas Lee.Guido van Rossum2007-10-091-5/+7
| | | | | Changes comparisons between PyBytes and PyUnicode to return unequal instead of raising TypeError.
* Breaking ground for PEP 3137 implementation:Guido van Rossum2007-10-081-8/+8
| | | | | | Get rid of buffer(). Use memoryview() in its place where possible. In a few places, do things a bit different, because memoryview() can't slice (yet).