예제 #1
0
 def test_division(self):
     self.assertAlmostEqual(23.976,
                            prass.parse_fps_string("24000/1001"),
                            places=3)
     self.assertAlmostEqual(29.970,
                            prass.parse_fps_string("30000/1001"),
                            places=3)
예제 #2
0
 def test_number(self):
     self.assertEqual(23.976, prass.parse_fps_string("23.976"))
     self.assertEqual(24, prass.parse_fps_string("24"))
예제 #3
0
 def test_invalid(self):
     self.assertRaises(common.PrassError,
                       lambda: prass.parse_fps_string("24000/1001/1"))
     self.assertRaises(common.PrassError,
                       lambda: prass.parse_fps_string("not a number"))