# File Name: appunittest1.py # Date: April 15, 2017 # Description: This class is for testing write file and read file in app.py # Method Level Comment: Python Convention (inside function) __author__ = "Inyoung Choung" from os import path import unittest from implementation import Impl # testing file IO. class writefiletest(unittest.TestCase): def runTest(self): """ run Test to check if the file exists. :return: """ # set a specific path to filepath variable filepath = "C:\In-young Choung\Computer Programming\Self Programming Files\grocerycalc\pytest.txt" # create a file and write "pythontest" Impl.writefile(self, filepath, "pythontest") # check if the file is correctly created in the path self.assertTrue(path.exists("pytest.txt")) # class starter if __name__ == '__main__': unittest.main()