diff options
-rw-r--r-- | Lib/test/string_tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index ea49e38..4964248 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -172,6 +172,9 @@ class BaseTest(unittest.TestCase): self.checkequal(-1, '', 'find', 'xx', 1, 1) self.checkequal(-1, '', 'find', 'xx', sys.maxsize, 0) + # issue 7458 + self.checkequal(-1, 'ab', 'find', 'xxx', sys.maxsize + 1, 0) + # For a variety of combinations, # verify that str.find() matches __contains__ # and that the found substring is really at that location @@ -240,6 +243,9 @@ class BaseTest(unittest.TestCase): if loc != -1: self.assertEqual(i[loc:loc+len(j)], j) + # issue 7458 + self.checkequal(-1, 'ab', 'rfind', 'xxx', sys.maxsize + 1, 0) + def test_index(self): self.checkequal(0, 'abcdefghiabc', 'index', '') self.checkequal(3, 'abcdefghiabc', 'index', 'def') |