/external/python/cpython2/Lib/test/ |
D | test_isinstance.py | 99 self.assertRaises(RuntimeError, issubclass, C(), S()) 109 self.assertRaises(TypeError, issubclass, C(), S()) 123 self.assertRaises(RuntimeError, issubclass, B, C()) 133 self.assertRaises(TypeError, issubclass, B, C()) 210 self.assertEqual(True, issubclass(Super, Super)) 211 self.assertEqual(False, issubclass(Super, AbstractSuper)) 212 self.assertEqual(False, issubclass(Super, Child)) 214 self.assertEqual(True, issubclass(Child, Child)) 215 self.assertEqual(True, issubclass(Child, Super)) 216 self.assertEqual(False, issubclass(Child, AbstractSuper)) [all …]
|
D | test_abc.py | 70 self.assertFalse(issubclass(OldstyleClass, A)) 71 self.assertFalse(issubclass(A, OldstyleClass)) 90 self.assertFalse(issubclass(B, A)) 91 self.assertFalse(issubclass(B, (A,))) 95 self.assertTrue(issubclass(B, A)) 96 self.assertTrue(issubclass(B, (A,))) 102 self.assertTrue(issubclass(C, A)) 103 self.assertTrue(issubclass(C, (A,))) 125 self.assertTrue(issubclass(int, A)) 126 self.assertTrue(issubclass(int, (A,))) [all …]
|
D | test_typechecks.py | 39 self.assertEqual(issubclass(int, Integer), True) 40 self.assertEqual(issubclass(int, (Integer,)), True) 41 self.assertEqual(issubclass(float, Integer), False) 42 self.assertEqual(issubclass(float, (Integer,)), False) 55 self.assertEqual(issubclass(Integer, Integer), True) 56 self.assertEqual(issubclass(Integer, (Integer,)), True) 59 self.assertEqual(issubclass(SubInt, Integer), True) 60 self.assertEqual(issubclass(SubInt, (Integer,)), True) 61 self.assertEqual(issubclass(SubInt, SubInt), True) 62 self.assertEqual(issubclass(SubInt, (SubInt,)), True) [all …]
|
D | test_abstract_numbers.py | 10 self.assertTrue(issubclass(int, Integral)) 11 self.assertTrue(issubclass(int, Complex)) 20 self.assertTrue(issubclass(long, Integral)) 21 self.assertTrue(issubclass(long, Complex)) 30 self.assertFalse(issubclass(float, Rational)) 31 self.assertTrue(issubclass(float, Real)) 38 self.assertFalse(issubclass(complex, Real)) 39 self.assertTrue(issubclass(complex, Complex))
|
D | test_collections.py | 288 self.assertTrue(issubclass(C, abc)) 293 self.assertTrue(issubclass(C, abc)) 298 self.assertFalse(issubclass(C, abc)) 302 self.assertFalse(issubclass(C, abc)) 342 self.assertFalse(issubclass(type(x), Hashable), repr(type(x))) 352 self.assertTrue(issubclass(type(x), Hashable), repr(type(x))) 360 self.assertFalse(issubclass(int, H)) 369 self.assertFalse(issubclass(type(x), Iterable), repr(type(x))) 379 self.assertTrue(issubclass(type(x), Iterable), repr(type(x))) 385 self.assertFalse(issubclass(str, I)) [all …]
|
D | test_ast.py | 241 self.assertTrue(issubclass(ast.For, ast.stmt)) 242 self.assertTrue(issubclass(ast.Name, ast.expr)) 243 self.assertTrue(issubclass(ast.stmt, ast.AST)) 244 self.assertTrue(issubclass(ast.expr, ast.AST)) 245 self.assertTrue(issubclass(ast.comprehension, ast.AST)) 246 self.assertTrue(issubclass(ast.Gt, ast.AST))
|
/external/python/cpython3/Lib/test/ |
D | test_isinstance.py | 111 self.assertRaises(RuntimeError, issubclass, C(), S()) 121 self.assertRaises(TypeError, issubclass, C(), S()) 135 self.assertRaises(RuntimeError, issubclass, B, C()) 145 self.assertRaises(TypeError, issubclass, B, C()) 213 self.assertEqual(True, issubclass(Super, Super)) 214 self.assertEqual(False, issubclass(Super, AbstractSuper)) 215 self.assertEqual(False, issubclass(Super, Child)) 217 self.assertEqual(True, issubclass(Child, Child)) 218 self.assertEqual(True, issubclass(Child, Super)) 219 self.assertEqual(False, issubclass(Child, AbstractSuper)) [all …]
|
D | test_abc.py | 260 self.assertFalse(issubclass(B, A)) 261 self.assertFalse(issubclass(B, (A,))) 265 self.assertTrue(issubclass(B, A)) 266 self.assertTrue(issubclass(B, (A,))) 273 self.assertTrue(issubclass(C, A)) 274 self.assertTrue(issubclass(C, (A,))) 285 self.assertTrue(issubclass(B, A)) 286 self.assertTrue(issubclass(B, (A,))) 293 self.assertTrue(issubclass(C, A)) 294 self.assertTrue(issubclass(C, (A,))) [all …]
|
D | test_typechecks.py | 34 self.assertEqual(issubclass(int, Integer), True) 35 self.assertEqual(issubclass(int, (Integer,)), True) 36 self.assertEqual(issubclass(float, Integer), False) 37 self.assertEqual(issubclass(float, (Integer,)), False) 50 self.assertEqual(issubclass(Integer, Integer), True) 51 self.assertEqual(issubclass(Integer, (Integer,)), True) 54 self.assertEqual(issubclass(SubInt, Integer), True) 55 self.assertEqual(issubclass(SubInt, (Integer,)), True) 56 self.assertEqual(issubclass(SubInt, SubInt), True) 57 self.assertEqual(issubclass(SubInt, (SubInt,)), True) [all …]
|
D | test_collections.py | 560 self.assertTrue(issubclass(C, abc)) 564 self.assertFalse(issubclass(C, abc)) 628 self.assertFalse(issubclass(type(x), Awaitable), repr(type(x))) 633 self.assertTrue(issubclass(type(x), Awaitable)) 648 self.assertTrue(issubclass(CoroLike, Awaitable)) 678 self.assertFalse(issubclass(type(x), Coroutine), repr(type(x))) 683 self.assertTrue(issubclass(type(x), Awaitable)) 705 self.assertTrue(issubclass(CoroLike, Coroutine)) 715 self.assertFalse(issubclass(CoroLike, Coroutine)) 722 self.assertFalse(issubclass(type(x), Hashable), repr(type(x))) [all …]
|
D | test_abstract_numbers.py | 10 self.assertTrue(issubclass(int, Integral)) 11 self.assertTrue(issubclass(int, Complex)) 21 self.assertFalse(issubclass(float, Rational)) 22 self.assertTrue(issubclass(float, Real)) 30 self.assertFalse(issubclass(complex, Real)) 31 self.assertTrue(issubclass(complex, Complex))
|
D | test_typing.py | 34 if not issubclass(cls, class_or_tuple): 41 if issubclass(cls, class_or_tuple): 76 issubclass(Employee, Any) 78 issubclass(Any, Employee) 85 issubclass(42, Any) 118 issubclass(Employee, NoReturn) 120 issubclass(NoReturn, Employee) 161 issubclass(int, T) 163 issubclass(T, int) 234 issubclass(int, Union) [all …]
|
D | test_baseexception.py | 13 self.assertTrue(issubclass(Exception, object)) 26 if issubclass(object_, BaseException): 67 self.assertTrue(issubclass(exc, superclasses[-1][1]),
|
/external/python/cpython2/Lib/ |
D | pprint.py | 150 if issubclass(typ, dict) and r is dict.__repr__: 179 if ((issubclass(typ, list) and r is list.__repr__) or 180 (issubclass(typ, tuple) and r is tuple.__repr__) or 181 (issubclass(typ, set) and r is set.__repr__) or 182 (issubclass(typ, frozenset) and r is frozenset.__repr__) 185 if issubclass(typ, list): 188 elif issubclass(typ, tuple): 217 if issubclass(typ, tuple) and length == 1: 265 if issubclass(typ, dict) and r is dict.__repr__: 290 if (issubclass(typ, list) and r is list.__repr__) or \ [all …]
|
D | abc.py | 109 if issubclass(subclass, cls): 113 if issubclass(cls, subclass): 175 if issubclass(subclass, rcls): 180 if issubclass(subclass, scls):
|
/external/python/cpython3/Lib/ |
D | statistics.py | 185 if issubclass(S, T): return S 186 if issubclass(T, S): return T 188 if issubclass(T, int): return S 189 if issubclass(S, int): return T 191 if issubclass(T, Fraction) and issubclass(S, float): 193 if issubclass(T, float) and issubclass(S, Fraction): 238 if issubclass(T, int) and value.denominator != 1: 244 if issubclass(T, Decimal):
|
D | _py_abc.py | 61 if issubclass(subclass, cls): 65 if issubclass(cls, subclass): 137 if issubclass(subclass, rcls): 142 if issubclass(subclass, scls):
|
/external/python/mock/mock/tests/ |
D | testcallable.py | 31 self.assertTrue(issubclass(MagicMock, Mock)) 32 self.assertTrue(issubclass(NonCallableMagicMock, NonCallableMock)) 37 self.assertTrue(issubclass(type(one.one), Mock)) 40 self.assertTrue(issubclass(type(two.two), MagicMock)) 48 self.assertTrue(issubclass(type(one.one), MockSub)) 54 self.assertTrue(issubclass(type(two.two), MagicSub))
|
/external/python/cpython3/Lib/unittest/test/testmock/ |
D | testcallable.py | 31 self.assertTrue(issubclass(MagicMock, Mock)) 32 self.assertTrue(issubclass(NonCallableMagicMock, NonCallableMock)) 37 self.assertTrue(issubclass(type(one.one), Mock)) 40 self.assertTrue(issubclass(type(two.two), MagicMock)) 48 self.assertTrue(issubclass(type(one.one), MockSub)) 54 self.assertTrue(issubclass(type(two.two), MagicSub))
|
/external/tensorflow/tensorflow/contrib/training/python/training/ |
D | hparam.py | 165 if issubclass(param_type, type(None)): 169 if (issubclass(param_type, (six.string_types, six.binary_type)) and 174 if issubclass(param_type, bool) != isinstance(value, bool): 178 if (issubclass(param_type, numbers.Integral) and 183 if (issubclass(param_type, numbers.Number) and 680 if issubclass(param_type, bool): 684 elif issubclass(param_type, six.integer_types): 688 elif issubclass(param_type, (six.string_types, six.binary_type)): 692 elif issubclass(param_type, float):
|
/external/python/cpython2/Lib/bsddb/test/ |
D | test_misc.py | 118 self.assertTrue(issubclass(db.DBError, Exception)) 121 self.assertTrue(issubclass(j, db.DBError), msg=i) 123 self.assertFalse(issubclass(j, KeyError), msg=i) 126 self.assertTrue(issubclass(db.DBKeyEmptyError, KeyError)) 127 self.assertTrue(issubclass(db.DBNotFoundError, KeyError))
|
/external/python/cpython2/Lib/plat-mac/ |
D | EasyDialogs.py | 673 if issubclass(tpwanted, Carbon.File.FSRef): 675 if issubclass(tpwanted, Carbon.File.FSSpec): 677 if issubclass(tpwanted, str): 679 if issubclass(tpwanted, unicode): 726 if issubclass(tpwanted, Carbon.File.FSRef): 728 if issubclass(tpwanted, Carbon.File.FSSpec): 730 if issubclass(tpwanted, (str, unicode)): 738 if issubclass(tpwanted, unicode): 783 if issubclass(tpwanted, Carbon.File.FSRef): 785 if issubclass(tpwanted, Carbon.File.FSSpec): [all …]
|
/external/fonttools/Lib/fontTools/unicodedata/ |
D | __init__.py | 105 if isinstance(default, type) and issubclass(default, KeyError): 134 if isinstance(default, type) and issubclass(default, KeyError): 202 if isinstance(default, type) and issubclass(default, KeyError):
|
/external/python/apitools/apitools/base/protorpclite/ |
D | messages.py | 637 if isinstance(field, type) and issubclass(field, Enum): 642 issubclass(field, Message) and 817 issubclass(field.message_type, Message)): 1626 issubclass(message_type, Message))) 1651 if isinstance(t, type) and issubclass(t, Message): 1668 issubclass(message_type, Message)): 1779 issubclass(enum_type, Enum))) 1825 issubclass(found_type, Enum)): 1915 issubclass(relative_to, Message)): 1968 issubclass(next_part, (Message, Enum))): [all …]
|
/external/python/cpython2/Lib/sqlite3/test/ |
D | dbapi.py | 48 self.assertTrue(issubclass(sqlite.Warning, StandardError), 52 self.assertTrue(issubclass(sqlite.Error, StandardError), 56 self.assertTrue(issubclass(sqlite.InterfaceError, sqlite.Error), 60 self.assertTrue(issubclass(sqlite.DatabaseError, sqlite.Error), 64 self.assertTrue(issubclass(sqlite.DataError, sqlite.DatabaseError), 68 self.assertTrue(issubclass(sqlite.OperationalError, sqlite.DatabaseError), 72 self.assertTrue(issubclass(sqlite.IntegrityError, sqlite.DatabaseError), 76 self.assertTrue(issubclass(sqlite.InternalError, sqlite.DatabaseError), 80 self.assertTrue(issubclass(sqlite.ProgrammingError, sqlite.DatabaseError), 84 self.assertTrue(issubclass(sqlite.NotSupportedError,
|