def test_inheritance_cycle():
 class CycleA:
  pass
 class CycleB:
  pass
 try:
  CycleA.__bases__ = (CycleA,)
  AssertUnreachable()
 except TypeError:
  pass
 try:
  CycleA.__bases__ = (CycleB,)
  CycleB.__bases__ = (CycleA,)
  AssertUnreachable()
 except TypeError:
  pass

def test_inheritance_cycle ( ) : class CycleA : pass class CycleB : pass try : CycleA . __bases__ = ( CycleA , ) AssertUnreachable ( ) except TypeError : pass try : CycleA . __bases__ = ( CycleB , ) CycleB . __bases__ = ( CycleA , ) AssertUnreachable ( ) except TypeError : pass
test for inheritance cycle .