Adding chapter 5 source code
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#test_mycalc_divide.py test suite for divide class method
|
||||
import unittest
|
||||
from myunittest.src.mycalc.mycalc import MyCalc
|
||||
|
||||
class MyCalcDivideTestSuite(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.calc = MyCalc()
|
||||
|
||||
def test_divide(self):
|
||||
""" test case to validate two positive numbers"""
|
||||
self.assertEqual(2, self.calc.divide(10 , 5), "should be 2")
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user