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