Home
last modified time | relevance | path

Searched refs:checkraises (Results 1 – 7 of 7) sorted by relevance

/external/python/cpython3/Lib/test/
Dstring_tests.py82 def checkraises(self, exc, obj, methodname, *args): member in BaseTest
125 self.checkraises(TypeError, 'hello', 'count')
130 self.checkraises(TypeError, 'hello', 'count', 42)
175 self.checkraises(TypeError, 'hello', 'find')
180 self.checkraises(TypeError, 'hello', 'find', 42)
233 self.checkraises(TypeError, 'hello', 'rfind')
238 self.checkraises(TypeError, 'hello', 'rfind', 42)
275 self.checkraises(ValueError, 'abcdefghiabc', 'index', 'hib')
276 self.checkraises(ValueError, 'abcdefghiab', 'index', 'abc', 1)
277 self.checkraises(ValueError, 'abcdefghi', 'index', 'ghi', 8)
[all …]
Dtest_userstring.py30 def checkraises(self, exc, obj, methodname, *args): member in UserStringTest
59 self.checkraises(UnicodeError, '\ud800', 'encode')
66 self.checkraises(UnicodeError, '\ud800', 'encode', None, None)
Dtest_unicode.py465 self.checkraises(TypeError, ' ', 'join', ['1', '2', MyWrapper('foo')])
466 self.checkraises(TypeError, ' ', 'join', ['1', '2', '3', bytes()])
467 self.checkraises(TypeError, ' ', 'join', [1, 2, 3])
468 self.checkraises(TypeError, ' ', 'join', ['1', '2', 3])
669 self.checkraises(TypeError, 'abc', 'isdecimal', 42)
/external/python/cpython2/Lib/test/
Dstring_tests.py71 def checkraises(self, exc, obj, methodname, *args): member in CommonTest
100 self.checkraises(TypeError, 'hello', 'capitalize', 42)
132 self.checkraises(TypeError, 'hello', 'count')
133 self.checkraises(TypeError, 'hello', 'count', 42)
178 self.checkraises(TypeError, 'hello', 'find')
179 self.checkraises(TypeError, 'hello', 'find', 42)
233 self.checkraises(TypeError, 'hello', 'rfind')
234 self.checkraises(TypeError, 'hello', 'rfind', 42)
269 self.checkraises(ValueError, 'abcdefghiabc', 'index', 'hib')
270 self.checkraises(ValueError, 'abcdefghiab', 'index', 'abc', 1)
[all …]
Dtest_string.py21 def checkraises(self, exc, obj, methodname, *args): member in StringTest
42 self.checkraises(TypeError, ['a', unicode('b'), 3], 'join', '.')
51 self.checkraises(TypeError, string_tests.BadSeq1(), 'join', ' ')
Dtest_userstring.py31 def checkraises(self, exc, obj, methodname, *args): member in UserStringTest
Dtest_unicode.py392 self.checkraises(TypeError, 'abc', 'isdecimal', 42)