summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bytes.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #28385: An error message when non-empty format spec is passed toSerhiy Storchaka2016-10-301-0/+9
| | | | object.__format__ now contains the name of actual type.
* Issue #27443: __length_hint__() of bytearray itearator no longer returnSerhiy Storchaka2016-07-031-0/+10
| | | | negative integer for resized bytearray.
* Issue #27039: Fixed bytearray.remove() for values greater than 127.Serhiy Storchaka2016-05-161-0/+7
| | | | Patch by Joe Jevnik.
* Make bytes and bytearray subclass tests compatible with base types tests.Serhiy Storchaka2016-05-121-15/+17
|
* Issue #26764: Bacported tests for bytes formatting.Serhiy Storchaka2016-04-151-26/+11
|
* Issue #26712: Unify (r)split, (l/r)strip tests into string_testsMartin Panter2016-04-101-87/+4
| | | | This eliminates a few redundant test cases.
* Issue #26257: Eliminate buffer_tests.py and fix ByteArrayAsStringTestMartin Panter2016-04-061-9/+6
| | | | | | | | | | | | | | | | ByteArrayAsStringTest.fixtype() was converting test data to bytes, not byte- array, therefore many of the test cases inherited in this class were not actually being run on the bytearray type. The tests in buffer_tests.py were redundant with methods in string_tests .MixinStrUnicodeUserStringTest and string_tests.CommonTest. These methods are now moved into string_tests.BaseTest, where they will also get run for bytes and bytearray. This change also moves test_additional_split(), test_additional_rsplit(), and test_strip() from CommonTest to BaseTest, meaning these tests are now run for bytes and bytearray. I plan to eliminate redundancies with existing tests in test_bytes.py soon.
* Issue #26492: Added additional tests for exhausted iterators of mutable ↵Serhiy Storchaka2016-03-301-0/+2
| | | | sequences.
* Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-0/+4
| | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
* Issue #26015: Added new tests for pickling iterators of mutable sequences.Serhiy Storchaka2016-03-061-3/+39
|
* Issue #19587: Remove masked and redundant tests in test_bytesMartin Panter2016-02-021-13/+0
| | | | | | | | * test_contains() did not override anything * test_expandtabs/upper/lower() in FixedStringTest were masking usable tests in string_tests. These tests now get run for bytearray() and bytes(). * test_expandtabs/upper/lower() in buffer_tests were only run on bytearray() and are redundant with string_tests
* Issue #25766: Special method __bytes__() now works in str subclasses.Serhiy Storchaka2015-12-201-0/+6
|
* Issue #24731: Fixed crash on converting objects with special methodsSerhiy Storchaka2015-11-251-0/+11
|\ | | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly.
| * Issue #24731: Fixed crash on converting objects with special methodsSerhiy Storchaka2015-11-251-0/+11
| | | | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly.
* | Issue #24467: Fixed possible buffer over-read in bytearray. The bytearraySerhiy Storchaka2015-06-291-1/+18
|\ \ | |/ | | | | | | object now always allocates place for trailing null byte and it's buffer now is always null-terminated.
| * Issue #24467: Fixed possible buffer over-read in bytearray. The bytearraySerhiy Storchaka2015-06-291-1/+18
| | | | | | | | | | object now always allocates place for trailing null byte and it's buffer now is always null-terminated.
* | Issue #23985: Fix a possible buffer overrun when deleting a slice from the ↵Antoine Pitrou2015-05-191-0/+16
|\ \ | |/ | | | | | | | | front of a bytearray and then appending some other bytes data. Patch by Martin Panter.
| * Issue #23985: Fix a possible buffer overrun when deleting a slice from the ↵Antoine Pitrou2015-05-191-0/+16
| | | | | | | | | | | | front of a bytearray and then appending some other bytes data. Patch by Martin Panter.
* | Use assertEqual rather than assertEquals to avoid the deprecation warning.Gregory P. Smith2015-04-261-4/+4
| |
* | Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview.Gregory P. Smith2015-04-251-0/+8
| | | | | | | | | | | | | | Also updates a few internal implementations of the same thing to use the new built-in code. Contributed by Arnon Yaari.
* | Issue #23681: The -b option now affects comparisons of bytes with int.Serhiy Storchaka2015-03-201-13/+28
| |
* | Issue #14203: Remove obsolete support for view==NULL in bytesiobuf_getbuffer()Stefan Krah2015-02-031-0/+4
| | | | | | | | and array_buffer_getbuf().
* | Don't use deprecated assertEquals.Serhiy Storchaka2015-01-261-4/+4
| |
* | Issue20284: Implement PEP461Ethan Furman2015-01-241-0/+44
| |
* | Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-16/+17
|\ \ | |/
| * Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-16/+17
| |
* | Issue #20335: bytes constructor now raises TypeError when encoding or errorsSerhiy Storchaka2014-12-021-0/+8
|\ \ | |/ | | | | is specified with non-string argument. Based on patch by Renaud Blanch.
| * Issue #20335: bytes constructor now raises TypeError when encoding or errorsSerhiy Storchaka2014-12-021-0/+8
| | | | | | | | is specified with non-string argument. Based on patch by Renaud Blanch.
* | Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff ↵Antoine Pitrou2014-11-021-0/+13
|\ \ | |/ | | | | bytes on a 32-bit platform.
| * Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff ↵Antoine Pitrou2014-11-021-0/+13
| | | | | | | | bytes on a 32-bit platform.
* | merge 3.4 (#22379)Benjamin Peterson2014-09-281-0/+1
|\ \ | |/
| * check that exception messages are not empty (#22379)Benjamin Peterson2014-09-281-0/+1
| | | | | | | | Patch by Yongzhi Pan.
* | Issue #22077: Improve index error messages for bytearrays, bytes, lists, andTerry Jan Reedy2014-08-021-0/+16
|/ | | | | tuples by adding 'or slices'. Added ', not <typename' for bytearrays. Original patch by Claudiu Popa.
* Fix test_bytes when sys.stdin is None, for example on Windows when usingVictor Stinner2014-07-281-1/+1
| | | | pythonw.exe instead of python.exe
* (Merge 3.3) Issue #19969: PyBytes_FromFormatV() now raises an OverflowError ifVictor Stinner2013-12-131-0/+6
|\ | | | | | | "%c" argument is not in range [0; 255].
| * Issue #19969: PyBytes_FromFormatV() now raises an OverflowError if "%c"Victor Stinner2013-12-131-0/+6
| | | | | | | | argument is not in range [0; 255].
* | Issue #19087: Improve bytearray allocation in order to allow cheap popping ↵Antoine Pitrou2013-10-051-0/+9
| | | | | | | | of data at the front (slice deletion).
* | Merge 3.3.Stefan Krah2013-01-261-0/+1
|\ \ | |/
| * Adapt test_bytes for a build --without-doc-strings.Stefan Krah2013-01-261-0/+1
| |
* | #16910: merge with 3.3.Ezio Melotti2013-01-101-15/+9
|\ \ | |/
| * #16910: test_bytes, test_unicode, and test_userstring now work with unittest ↵Ezio Melotti2013-01-101-15/+9
| | | | | | | | test discovery. Patch by Zachary Ware.
* | Use OESeeror instead of os.error (#16720)Andrew Svetlov2012-12-241-1/+1
| | | | | | | | Patch by Serhiy Storchaka.
* | merge 3.3 (#16722)Benjamin Peterson2012-12-191-0/+6
|\ \ | |/
| * try to call __bytes__ before __index__ (closes #16722)Benjamin Peterson2012-12-191-0/+6
| |
| * #8401: merge with 3.2.Ezio Melotti2012-11-031-0/+18
| |\
* | \ #8401: merge with 3.3.Ezio Melotti2012-11-031-0/+18
|\ \ \ | | |/ | |/|
| * | #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an ↵Ezio Melotti2012-11-031-0/+18
| | | | | | | | | | | | error.
* | | Issue #15958: bytes.join and bytearray.join now accept arbitrary buffer objects.Antoine Pitrou2012-10-161-2/+21
| |/ |/|
* | Issue #14288: Serialization support for builtin iterators.Kristján Valur Jónsson2012-04-031-0/+18
| |
* | #14081: The sep and maxsplit parameter to str.split, bytes.split, and ↵Ezio Melotti2012-02-261-0/+16
| | | | | | | | bytearray.split may now be passed as keyword arguments.