def test_deprecated_class_with_super():
 @deprecated(u'100.0')
 class TB(object, ):
  def __init__(self, a, b):
   super(TB, self).__init__()
 with catch_warnings(AstropyDeprecationWarning) as w:
  TB(1, 2)
 assert (len(w) == 1)
 if (TB.__doc__ is not None):
  assert (u'function' not in TB.__doc__)
  assert (u'deprecated' in TB.__doc__)
  assert (u'function' not in TB.__init__.__doc__)
  assert (u'deprecated' in TB.__init__.__doc__)

def test_deprecated_class_with_super ( ) : @ deprecated ( u'100.0' ) class TB ( object , ) : def __init__ ( self , a , b ) : super ( TB , self ) . __init__ ( ) with catch_warnings ( AstropyDeprecationWarning ) as w : TB ( 1 , 2 ) assert ( len ( w ) == 1 ) if ( TB . __doc__ is not None ) : assert ( u'function' not in TB . __doc__ ) assert ( u'deprecated' in TB . __doc__ ) assert ( u'function' not in TB . __init__ . __doc__ ) assert ( u'deprecated' in TB . __init__ . __doc__ )
regression test for an issue where classes that used super() in their __init__ did not actually call the correct classs __init__ in the mro .