Example #1
0
 def test_module(self):
     calc = Caculator(isAdd=True,
                      isSub=False,
                      isMul=False,
                      isDiv=False,
                      isRem=False)
     dict = calc.getStatus()
     if self.assertTrue(dict["add"]): pass
     if self.assertFalse(dict["sub"]): pass
     if self.assertFalse(dict["mul"]): pass
     if self.assertFalse(dict["div"]): pass
     if self.assertFalse(dict["rem"]): pass
Example #2
0
import unittest
from khleepkg03.app import Caculator

calc = Caculator(True, True, True, True, True)
dict = calc.getStatus()


class TestPackage(unittest.TestCase):
    def test_module_adder(self):
        # Member Value: Dict["add"]
        if self.assertTrue(dict["add"]):
            pass

    def test_module_substract(self):
        # Member Value: Dict["sub"]
        if self.assertTrue(dict["sub"]):
            pass

    def test_module_multiplication(self):
        # Member Value: Dict["mul"]
        if self.assertTrue(dict["mul"]):
            pass

    def test_module_division(self):
        # Member Value: Dict["div"]
        if self.assertTrue(dict["div"]):
            pass

    def test_module_reminder(self):
        # Member Value: Dict["rem"]
        if self.assertTrue(dict["rem"]):