예제 #1
0
 def setUp(self):
     self.math_object = mathfunc.Maths(1,2)
예제 #2
0
 def test_divide(self):
     """Test method divide(a, b)"""
     self.assertEqual(2, mathfunc.Maths(6, 3).divide())
     self.assertEqual(2.5, mathfunc.Maths(5, 2).divide())
예제 #3
0
 def test_minus(self):
     """Test method minus(a, b)"""
     self.assertEqual(1, mathfunc.Maths(3, 2).minus())
예제 #4
0
 def test_multi(self):
     """Test method multi(a, b)"""
     self.assertEqual(6, mathfunc.Maths(2, 3).multi())
예제 #5
0
 def test_add(self):
     """Test method add(a, b)"""
     self.assertEqual(3, mathfunc.Maths(1, 2).add())
     self.assertNotEqual(3, mathfunc.Maths(2, 2).add())