def test_float_to_latex(self): self.assertEqual(float_to_latex(1), '1') self.assertEqual(float_to_latex(100), '10^{2}') self.assertEqual(float_to_latex(-500), r'-5\!\!\times\!\!10^{2}') self.assertRaises(TypeError, float_to_latex, '1')
def test_float_to_latex(self): self.assertEqual(float_to_latex(1), "1") self.assertEqual(float_to_latex(100), "10^{2}") self.assertEqual(float_to_latex(-500), r"-5\!\!\times\!\!10^{2}") self.assertRaises(TypeError, float_to_latex, "1")
def test_float_to_latex(self): assert float_to_latex(1) == '1' assert float_to_latex(100) == '10^{2}' assert float_to_latex(-500) == r'-5\!\!\times\!\!10^{2}' with pytest.raises(TypeError): float_to_latex('1')