From 275bd96aa67ce2bf1c1f57cb5c2cb840d3afbb2d Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Tue, 2 Feb 2016 10:37:15 +0000 Subject: 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 --- Lib/test/string_tests.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Lib/test/string_tests.py') diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index 7605f0dd198..da79ffa4192 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -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 -- cgit v1.2.3