]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #26257: Eliminate buffer_tests.py and fix ByteArrayAsStringTest
authorMartin Panter <vadmium+py@gmail.com>
Wed, 6 Apr 2016 06:37:17 +0000 (06:37 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Wed, 6 Apr 2016 06:37:17 +0000 (06:37 +0000)
commit152a19c6bd59b772660c8af050248a196bb6a848
tree001af34753cc3f248610d31ca9c9d45011cdfcfd
parentb0660582cc9260022053c83dcfddd47891700147
Issue #26257: Eliminate buffer_tests.py and fix ByteArrayAsStringTest

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.
Lib/test/buffer_tests.py [deleted file]
Lib/test/string_tests.py
Lib/test/test_bytes.py
Lib/test/test_unicode.py