Exemple #1
0
 def test_truncate_str(self):
     self.assertEqual(utils.truncate('nofloat'), 'nofloat')
Exemple #2
0
 def test_truncate_str(self):
     self.assertEqual(utils.truncate('nofloat'), 'nofloat')
Exemple #3
0
 def test_truncate_float(self):
     original_float = 3.232999
     truncated_float = utils.truncate(original_float, n=2)
     self.assertIsInstance(truncated_float, float)
     self.assertGreater(original_float, truncated_float)
Exemple #4
0
 def test_truncate_float(self):
     original_float = 3.232999
     truncated_float = utils.truncate(original_float, n=2)
     self.assertIsInstance(truncated_float, float)
     self.assertGreater(original_float, truncated_float)