mirror of https://github.com/python/cpython
Remove duplicate tests.
This commit is contained in:
parent
51ab414627
commit
20badb31b4
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue