mirror of
https://github.com/python/cpython.git
synced 2024-12-02 14:24:12 +08:00
heads merging
This commit is contained in:
commit
db26dff560
@ -1225,19 +1225,19 @@ class MixinStrUnicodeUserStringTest:
|
||||
# issue 11828
|
||||
s = 'hello'
|
||||
x = 'x'
|
||||
self.assertRaisesRegexp(TypeError, r'^find\(', s.find,
|
||||
self.assertRaisesRegex(TypeError, r'^find\(', s.find,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'^rfind\(', s.rfind,
|
||||
self.assertRaisesRegex(TypeError, r'^rfind\(', s.rfind,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'^index\(', s.index,
|
||||
self.assertRaisesRegex(TypeError, r'^index\(', s.index,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'^rindex\(', s.rindex,
|
||||
self.assertRaisesRegex(TypeError, r'^rindex\(', s.rindex,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'^count\(', s.count,
|
||||
self.assertRaisesRegex(TypeError, r'^count\(', s.count,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'^startswith\(', s.startswith,
|
||||
self.assertRaisesRegex(TypeError, r'^startswith\(', s.startswith,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'^endswith\(', s.endswith,
|
||||
self.assertRaisesRegex(TypeError, r'^endswith\(', s.endswith,
|
||||
x, None, None, None)
|
||||
|
||||
|
||||
|
@ -523,19 +523,19 @@ class BaseBytesTest(unittest.TestCase):
|
||||
# issue 11828
|
||||
b = self.type2test(b'hello')
|
||||
x = self.type2test(b'x')
|
||||
self.assertRaisesRegexp(TypeError, r'\bfind\b', b.find,
|
||||
self.assertRaisesRegex(TypeError, r'\bfind\b', b.find,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'\brfind\b', b.rfind,
|
||||
self.assertRaisesRegex(TypeError, r'\brfind\b', b.rfind,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'\bindex\b', b.index,
|
||||
self.assertRaisesRegex(TypeError, r'\bindex\b', b.index,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'\brindex\b', b.rindex,
|
||||
self.assertRaisesRegex(TypeError, r'\brindex\b', b.rindex,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'\bcount\b', b.count,
|
||||
self.assertRaisesRegex(TypeError, r'\bcount\b', b.count,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'\bstartswith\b', b.startswith,
|
||||
self.assertRaisesRegex(TypeError, r'\bstartswith\b', b.startswith,
|
||||
x, None, None, None)
|
||||
self.assertRaisesRegexp(TypeError, r'\bendswith\b', b.endswith,
|
||||
self.assertRaisesRegex(TypeError, r'\bendswith\b', b.endswith,
|
||||
x, None, None, None)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user