/third_party/python/Lib/test/ |
D | test_isinstance.py | 113 self.assertRaises(RuntimeError, issubclass, C(), S()) 123 self.assertRaises(TypeError, issubclass, C(), S()) 137 self.assertRaises(RuntimeError, issubclass, B, C()) 147 self.assertRaises(TypeError, issubclass, B, C()) 234 self.assertEqual(True, issubclass(Super, Super)) 235 self.assertEqual(False, issubclass(Super, AbstractSuper)) 236 self.assertEqual(False, issubclass(Super, Child)) 238 self.assertEqual(True, issubclass(Child, Child)) 239 self.assertEqual(True, issubclass(Child, Super)) 240 self.assertEqual(False, issubclass(Child, AbstractSuper)) [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_abc.py | 279 self.assertFalse(issubclass(B, A)) 280 self.assertFalse(issubclass(B, (A,))) 284 self.assertTrue(issubclass(B, A)) 285 self.assertTrue(issubclass(B, (A,))) 292 self.assertTrue(issubclass(C, A)) 293 self.assertTrue(issubclass(C, (A,))) 304 self.assertTrue(issubclass(B, A)) 305 self.assertTrue(issubclass(B, (A,))) 312 self.assertTrue(issubclass(C, A)) 313 self.assertTrue(issubclass(C, (A,))) [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_collections.py | 726 self.assertTrue(issubclass(C, abc)) 730 self.assertFalse(issubclass(C, abc)) 794 self.assertFalse(issubclass(type(x), Awaitable), repr(type(x))) 799 self.assertTrue(issubclass(type(x), Awaitable)) 814 self.assertTrue(issubclass(CoroLike, Awaitable)) 844 self.assertFalse(issubclass(type(x), Coroutine), repr(type(x))) 849 self.assertTrue(issubclass(type(x), Awaitable)) 871 self.assertTrue(issubclass(CoroLike, Coroutine)) 881 self.assertFalse(issubclass(CoroLike, Coroutine)) 888 self.assertFalse(issubclass(type(x), Hashable), repr(type(x))) [all …]
|
D | test_datetime.py | 31 if issubclass(cls, unittest.TestCase): 33 elif issubclass(cls, unittest.TestSuite):
|
D | test_baseexception.py | 13 self.assertTrue(issubclass(Exception, object)) 26 if issubclass(object_, BaseException): 68 self.assertTrue(issubclass(exc, superclasses[-1][1]),
|
D | test_winconsoleio.py | 20 self.assertTrue(issubclass(ConIO, io.RawIOBase)) 21 self.assertFalse(issubclass(ConIO, io.BufferedIOBase)) 22 self.assertFalse(issubclass(ConIO, io.TextIOBase))
|
D | test_pickle.py | 395 if isinstance(attr, type) and issubclass(attr, BaseException): 426 self.assertTrue(issubclass(attr, OSError)) 429 self.assertTrue(issubclass(attr, ImportError)) 494 if exc is not OSError and issubclass(exc, OSError): 497 elif exc is not ImportError and issubclass(exc, ImportError):
|
D | test_typing.py | 42 if not issubclass(cls, class_or_tuple): 49 if issubclass(cls, class_or_tuple): 84 issubclass(Employee, Any) 86 issubclass(Any, Employee) 93 issubclass(42, Any) 126 issubclass(Employee, NoReturn) 128 issubclass(NoReturn, Employee) 169 issubclass(int, T) 171 issubclass(T, int) 259 issubclass(int, Union) [all …]
|
D | test_contextlib_async.py | 77 self.assertTrue(issubclass(ManagerFromScratch, AbstractAsyncContextManager)) 83 self.assertTrue(issubclass(DefaultEnter, AbstractAsyncContextManager)) 88 self.assertFalse(issubclass(NoneAenter, AbstractAsyncContextManager)) 93 self.assertFalse(issubclass(NoneAexit, AbstractAsyncContextManager))
|
/third_party/mindspore/tests/mindspore_test_framework/ |
D | mindspore_test.py | 48 if issubclass(component, IFacadeComponent): 50 elif issubclass(component, IDataComponent): 52 elif issubclass(component, IBuilderComponent): 54 elif issubclass(component, IExectorComponent): 56 elif issubclass(component, IVerifierComponent): 58 elif issubclass(component, IFIPolicyComponent): 60 elif issubclass(component, IERPolicyComponent):
|
/third_party/python/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))
|
D | support.py | 6 return issubclass(type(obj), klass)
|
/third_party/python/Lib/ |
D | _py_abc.py | 61 if issubclass(subclass, cls): 65 if issubclass(cls, subclass): 137 if issubclass(subclass, rcls): 142 if issubclass(subclass, scls):
|
D | statistics.py | 225 if issubclass(S, T): return S 226 if issubclass(T, S): return T 228 if issubclass(T, int): return S 229 if issubclass(S, int): return T 231 if issubclass(T, Fraction) and issubclass(S, float): 233 if issubclass(T, float) and issubclass(S, Fraction): 270 if issubclass(T, int) and value.denominator != 1: 276 if issubclass(T, Decimal):
|
D | warnings.py | 146 assert issubclass(category, Warning), "category must be a Warning subclass" 267 if not issubclass(cat, Warning): 295 if not (isinstance(category, type) and issubclass(category, Warning)): 354 issubclass(category, cat) and
|
D | functools.py | 715 if issubclass(cls, base) and not any( 716 issubclass(b, base) for b in cls.__bases__ 744 and issubclass(cls, typ)) 761 if sub not in bases and issubclass(cls, sub): 792 and not issubclass(match, t)):
|
/third_party/mindspore/mindspore/_extends/graph_kernel/expanders/ |
D | _utils.py | 120 if not issubclass(cls, Expander): 143 if not issubclass(cls, Expander): 160 if not issubclass(cls, Expander):
|
/third_party/python/Lib/sqlite3/test/ |
D | dbapi.py | 48 self.assertTrue(issubclass(sqlite.Warning, Exception), 52 self.assertTrue(issubclass(sqlite.Error, Exception), 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,
|
/third_party/boost/tools/build/src/build/ |
D | scanner.py | 59 assert issubclass(scanner_class, Scanner) 72 assert issubclass(scanner_class, Scanner)
|
/third_party/python/Lib/test/support/ |
D | warnings_helper.py | 18 testcase.assertTrue(issubclass(warn.category, SyntaxWarning), 170 issubclass(warning.__class__, cat)):
|
/third_party/python/Lib/unittest/ |
D | loader.py | 86 if issubclass(testCaseClass, suite.TestSuite): 123 if isinstance(obj, type) and issubclass(obj, case.TestCase): 192 elif isinstance(obj, type) and issubclass(obj, case.TestCase): 196 issubclass(parent, case.TestCase)):
|
/third_party/python/Lib/ctypes/ |
D | _endian.py | 19 if issubclass(typ, Structure):
|
/third_party/mindspore/mindspore/ops/ |
D | _register_for_op.py | 31 elif issubclass(prim, Primitive):
|