def evaluate(file_instance): """ Will run Pylint and task-associated unittests against the uploaded file """ evals = UnitTest.objects.filter(tasks=file_instance.task) # discovers the unit tests for the task in question uploadFilePath = str(file_instance.fileUpload) # discovers the path for the file in question gameAndGradeParser.pylintEvaluate(uploadFilePath) unitTestEvaluate(evals, uploadFilePath)
def setUp(self): # run pylintEvaluate to create the pylint files gameAndGradeParser.pylintEvaluate(GOODCODEIN, GOODCODEOUT) gameAndGradeParser.pylintEvaluate(EMPTYCODEIN, EMPTYCODEOUT) gameAndGradeParser.pylintEvaluate(BADCODEIN, BADCODEOUT)