Exemple #1
0
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)
Exemple #2
0
 def setUp(self):
     # run pylintEvaluate to create the pylint files
     gameAndGradeParser.pylintEvaluate(GOODCODEIN, GOODCODEOUT)
     gameAndGradeParser.pylintEvaluate(EMPTYCODEIN, EMPTYCODEOUT)
     gameAndGradeParser.pylintEvaluate(BADCODEIN, BADCODEOUT)