mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Issue #19587: Remove masked and redundant tests in test_bytes
* 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
This commit is contained in:
parent
3464ea2807
commit
275bd96aa6
3 changed files with 6 additions and 63 deletions
|
@ -1467,24 +1467,11 @@ class BytearrayPEP3137Test(unittest.TestCase,
|
|||
|
||||
|
||||
class FixedStringTest(test.string_tests.BaseTest):
|
||||
|
||||
def fixtype(self, obj):
|
||||
if isinstance(obj, str):
|
||||
return obj.encode("utf-8")
|
||||
return super().fixtype(obj)
|
||||
|
||||
# Currently the bytes containment testing uses a single integer
|
||||
# value. This may not be the final design, but until then the
|
||||
# bytes section with in a bytes containment not valid
|
||||
def test_contains(self):
|
||||
pass
|
||||
def test_expandtabs(self):
|
||||
pass
|
||||
def test_upper(self):
|
||||
pass
|
||||
def test_lower(self):
|
||||
pass
|
||||
|
||||
class ByteArrayAsStringTest(FixedStringTest, unittest.TestCase):
|
||||
type2test = bytearray
|
||||
contains_bytes = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue