예제 #1
0
class AddTestCase(unittest.TestCase):
    """ My first Python Unittext case.
    """
    def setUp(self):
        self.add = Add()

    def tearDown(self):
        self.add = None

    def testAdd(self):
        assert self.add.calc(1, 2) == 3

    def testAddNeg(self):
        assert self.add.calc(1, -2) == -1
예제 #2
0
class AddTestCase(unittest.TestCase):
    """ My first Python Unittext case.
    """

    def setUp(self):
        self.add = Add()

    def tearDown(self):
        self.add = None

    def testAdd(self):
        assert self.add.calc(1, 2) == 3

    def testAddNeg(self):
        assert self.add.calc(1, -2) == -1
예제 #3
0
 def setUp(self):
     self.add = Add()
예제 #4
0
 def setUp(self):
     self.add = Add()