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:
Martin Panter 2016-02-02 10:37:15 +00:00
parent 3464ea2807
commit 275bd96aa6
3 changed files with 6 additions and 63 deletions

View file

@ -1,5 +1,5 @@
"""
Common tests shared by test_unicode, test_userstring and test_string.
Common tests shared by test_unicode, test_userstring and test_bytes.
"""
import unittest, string, sys, struct
@ -686,8 +686,7 @@ class BaseTest:
class CommonTest(BaseTest):
# This testcase contains tests that can be used in all
# stringlike classes. Currently this is str, unicode
# UserString and the string module.
# stringlike classes. Currently this is str and UserString.
def test_hash(self):
# SF bug 1054139: += optimization was not invalidating cached hash value
@ -857,8 +856,7 @@ class CommonTest(BaseTest):
class MixinStrUnicodeUserStringTest:
# additional tests that only work for
# stringlike objects, i.e. str, unicode, UserString
# (but not the string module)
# stringlike objects, i.e. str, UserString
def test_islower(self):
self.checkequal(False, '', 'islower')
@ -1343,7 +1341,7 @@ class MixinStrUnicodeUserStringTest:
class MixinStrUnicodeTest:
# Additional tests that only work with str and unicode.
# Additional tests that only work with str.
def test_bug1001011(self):
# Make sure join returns a NEW object for single item sequences