def test_mro():
 class A(object, ):
  pass
 AreEqual(A.__mro__, (A, object))
 class B(object, ):
  pass
 AreEqual(B.__mro__, (B, object))
 class C(B, ):
  pass
 AreEqual(C.__mro__, (C, B, object))
 class N(C, B, A, ):
  pass
 AreEqual(N.__mro__, (N, C, B, A, object))
 try:
  class N(A, B, C, ):
   pass
  AssertUnreachable('impossible MRO created')
 except TypeError:
  pass
 try:
  class N(A, A, ):
   pass
  AssertUnreachable("can't dervie from the same base type twice")
 except TypeError:
  pass

def test_mro ( ) : class A ( object , ) : pass AreEqual ( A . __mro__ , ( A , object ) ) class B ( object , ) : pass AreEqual ( B . __mro__ , ( B , object ) ) class C ( B , ) : pass AreEqual ( C . __mro__ , ( C , B , object ) ) class N ( C , B , A , ) : pass AreEqual ( N . __mro__ , ( N , C , B , A , object ) ) try : class N ( A , B , C , ) : pass AssertUnreachable ( 'impossible MRO created' ) except TypeError : pass try : class N ( A , A , ) : pass AssertUnreachable ( "can't dervie from the same base type twice" ) except TypeError : pass
mro support .