示例#1
0
 def test_floor_bad_params(self):
     with self.assertRaises(TypeError):
         self._test(None, labmath.floor(None))
     with self.assertRaises(TypeError):
         self._test(None, labmath.floor("abc"))
示例#2
0
 def test_floor(self):
     self._test(int, type(labmath.floor(1)))
     self._test(1, labmath.floor(1))
     self._test(1, labmath.floor(1.1))
     self._test(2, labmath.floor(2.5))
     self._test(3, labmath.floor(3.9))