def test_deprecated_class_with_custom_metaclass():
 with catch_warnings(AstropyDeprecationWarning) as w:
  TB()
 assert (len(w) == 1)
 assert (type(TB) is TMeta)
 assert (TB.metaclass_attr == 1)

def test_deprecated_class_with_custom_metaclass ( ) : with catch_warnings ( AstropyDeprecationWarning ) as w : TB ( ) assert ( len ( w ) == 1 ) assert ( type ( TB ) is TMeta ) assert ( TB . metaclass_attr == 1 )
regression test for an issue where deprecating a class with a metaclass other than type did not restore the metaclass properly .