def test_predefined_string_roundtrip():
 with u.magnitude_zero_points.enable():
  assert (u.Unit(u.STmag.to_string()) == u.STmag)
  assert (u.Unit(u.ABmag.to_string()) == u.ABmag)
  assert (u.Unit(u.M_bol.to_string()) == u.M_bol)
  assert (u.Unit(u.m_bol.to_string()) == u.m_bol)

def test_predefined_string_roundtrip ( ) : with u . magnitude_zero_points . enable ( ) : assert ( u . Unit ( u . STmag . to_string ( ) ) == u . STmag ) assert ( u . Unit ( u . ABmag . to_string ( ) ) == u . ABmag ) assert ( u . Unit ( u . M_bol . to_string ( ) ) == u . M_bol ) assert ( u . Unit ( u . m_bol . to_string ( ) ) == u . m_bol )
ensure roundtripping; see #5015 .