示例#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))
示例#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))
示例#3
0
 def test_basic(self):
     self.assertEqual(62.5, _percent(5, 8))
示例#4
0
 def test_basic(self):
     self.assertEqual(62.5, _percent(5, 8))