Ejemplo n.º 1
0
 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')
Ejemplo n.º 2
0
 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')
Ejemplo n.º 3
0
 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")
Ejemplo n.º 4
0
 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')
Ejemplo n.º 5
0
 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')