Example #1
0
 def test_default(self):
     self.assertEqual(0.0, _percent(1, 0))
     self.assertEqual(0.0, _percent(0, 0))
     self.assertEqual(None, _percent(0, 0, default=None))
Example #2
0
 def test_default(self):
     self.assertEqual(0.0, _percent(1, 0))
     self.assertEqual(0.0, _percent(0, 0))
     self.assertEqual(None, _percent(0, 0, default=None))
Example #3
0
 def test_basic(self):
     self.assertEqual(62.5, _percent(5, 8))
Example #4
0
 def test_basic(self):
     self.assertEqual(62.5, _percent(5, 8))