def testReadAllMajorData(self): print "----------UNIT TEST-------" CompSci = Major("CS.req") error = 0 #if file does not exist if not os.path.exists("CS.req"): print "Error, file does not exist" error = 1 # if file was not formatted properly if (CompSci.getName().strip() != 'Computer Science'): print "Error, file formatted incorrectly" error = 1 if (CompSci.getTotalHoursRequired() != 128): print "Error, file formatted incorrectly" error = 1 #output requirements #print CompSci.printReq() if (error == 0): print "ALL ERROR CHECKS PASSED" print "---------------------------" print print