예제 #1
0
 def test_solve_ten_half(self):
     r = round.Round()
     r.a = Decimal('145')
     r.b = 10
     s = r.solve()
     self.assertEqual(s, 150)
예제 #2
0
 def test_solve_hundred_up(self):
     r = round.Round()
     r.a = Decimal('176')
     r.b = 100
     s = r.solve()
     self.assertEqual(s, 200)
예제 #3
0
 def test_solve_hundred_down(self):
     r = round.Round()
     r.a = Decimal('122')
     r.b = 100
     s = r.solve()
     self.assertEqual(s, 100)
예제 #4
0
 def test_solve_ten_down(self):
     r = round.Round()
     r.a = Decimal('142')
     r.b = 10
     s = r.solve()
     self.assertEqual(s, 140)