def test_TRUNC_with_bad_arg(self): self.assertIsInstance(math.TRUNC('bad'), xlerrors.ValueExcelError) self.assertIsInstance(math.TRUNC(1.3, 'bad'), xlerrors.ValueExcelError)
def test_TRUNC(self): self.assertEqual(math.TRUNC(0.6), 0) self.assertEqual(math.TRUNC(1.3), 1) self.assertEqual(math.TRUNC(1.26, 1), 1.2)