import unittest
import calc

class CalcTest(unittest.TestCase):
    '''Calc tests'''

    @classmethod
    def setUpClass(cls):
        '''Set up for clss'''
        print('setUpClass')
        print('==========')

    @classmethod
    def tearDownClass(cls):
        '''Tear down for class'''
        print('==========')
        print('tearDownClass')

    def setUp(self):
        '''Set up for test'''
        print('Set up for [' + self.shortDescription() + ']')

    def tearDown(self):
        '''Set down for test'''
        print('Set up for test [' + self.shortDescription() + ']')
        print('')
    
    def test_add(self):
        'Тест сложения'
        print('id:' + self.id())
        self.assertEqual(calc.add(1, 2), 3)

    def test_sub(self):
        'Тест вычета'
        print('id:' + self.id())
        self.assertEqual(calc.sub(4, 2), 2)

    def test_mul(self):
        'Тест умножения'
        print('id:' + self.id())
        self.assertEqual(calc.mul(2, 2), 4)

    def test_div(self):
        'Тест деления'
        print('id:' + self.id())
        self.assertEqual(calc.div(4, 2), 2)

if __name__ == '__main__':
    unittest.main()
