Remove duplicate tests.

This commit is contained in:
Walter Dörwald 2007-05-05 15:57:18 +00:00
parent 51ab414627
commit 20badb31b4
1 changed files with 4 additions and 24 deletions

View File

@ -198,6 +198,10 @@ class BoolTest(unittest.TestCase):
self.assertIs("xyz".isdigit(), False)
self.assertIs("xyz".islower(), True)
self.assertIs("XYZ".islower(), False)
self.assertIs("0123".isdecimal(), True)
self.assertIs("xyz".isdecimal(), False)
self.assertIs("0123".isnumeric(), True)
self.assertIs("xyz".isnumeric(), False)
self.assertIs(" ".isspace(), True)
self.assertIs("XYZ".isspace(), False)
self.assertIs("X".istitle(), True)
@ -207,30 +211,6 @@ class BoolTest(unittest.TestCase):
self.assertIs("xyz".startswith("x"), True)
self.assertIs("xyz".startswith("z"), False)
if test_support.have_unicode:
self.assertIs(str("xyz", 'ascii').endswith(str("z", 'ascii')), True)
self.assertIs(str("xyz", 'ascii').endswith(str("x", 'ascii')), False)
self.assertIs(str("xyz0123", 'ascii').isalnum(), True)
self.assertIs(str("@#$%", 'ascii').isalnum(), False)
self.assertIs(str("xyz", 'ascii').isalpha(), True)
self.assertIs(str("@#$%", 'ascii').isalpha(), False)
self.assertIs(str("0123", 'ascii').isdecimal(), True)
self.assertIs(str("xyz", 'ascii').isdecimal(), False)
self.assertIs(str("0123", 'ascii').isdigit(), True)
self.assertIs(str("xyz", 'ascii').isdigit(), False)
self.assertIs(str("xyz", 'ascii').islower(), True)
self.assertIs(str("XYZ", 'ascii').islower(), False)
self.assertIs(str("0123", 'ascii').isnumeric(), True)
self.assertIs(str("xyz", 'ascii').isnumeric(), False)
self.assertIs(str(" ", 'ascii').isspace(), True)
self.assertIs(str("XYZ", 'ascii').isspace(), False)
self.assertIs(str("X", 'ascii').istitle(), True)
self.assertIs(str("x", 'ascii').istitle(), False)
self.assertIs(str("XYZ", 'ascii').isupper(), True)
self.assertIs(str("xyz", 'ascii').isupper(), False)
self.assertIs(str("xyz", 'ascii').startswith(str("x", 'ascii')), True)
self.assertIs(str("xyz", 'ascii').startswith(str("z", 'ascii')), False)
def test_boolean(self):
self.assertEqual(True & 1, 1)
self.assert_(not isinstance(True & 1, bool))