def test_unit_to_latex(self): t = unit_to_latex(units.Hertz) self.assertEqual(t, r'$\mathrm{Hz}$') t = unit_to_latex(units.Volt.decompose()) self.assertEqual(t, r'$\mathrm{m^{2}\,kg\,A^{-1}\,s^{-3}}$')
def test_unit_to_latex(self): t = unit_to_latex(units.Hertz) assert t == r'$\mathrm{Hz}$' t = unit_to_latex(units.Volt.decompose()) assert t == r'$\mathrm{m^{2}\,kg\,A^{-1}\,s^{-3}}$'