import unittest, my_math from subprocess import Popen, PIPE class ProductTestCase(unittest.TestCase): # Insert previous tests here def test_with_PyChecker(self): cmd = 'pychecker', '-Q', my_math.__file__.rstrip('c') pychecker = Popen(cmd, stdout=PIPE, stderr=PIPE) self.assertEqual(pychecker.stdout.read(), '') def test_with_PyLint(self): cmd = 'pylint', '-rn', 'my_math' pylint = Popen(cmd, stdout=PIPE, stderr=PIPE) self.assertEqual(pylint.stdout.read(), '') if __name__ == '__main__': unittest.main()