def test_matchesExample(self): import sys from StringIO import StringIO stdout = sys.stdout out = StringIO() with open('./data/sample_solution.csv') as f: expected = f.readlines() try: sys.stdout = out gradeToLevels,levelToGrades,classPath = studentpath.getClassPath(self.domainOrderContentExpected) studentpath.getStudentPath(gradeToLevels,levelToGrades,classPath,self.studentTestContent) output = out.getvalue() self.assertEqual(output,''.join(expected)) finally: sys.stdout = stdout
def test_getClasspath(self): gradeToLevels,levelToGrades,classPath = studentpath.getClassPath(self.domainOrderContentExpected) self.assertEqual( classPath, self.expectedStudentPath)