示例#1
0
文件: views.py 项目: eshim/game-grade
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)
示例#2
0
 def setUp(self):
     # run pylintEvaluate to create the pylint files
     gameAndGradeParser.pylintEvaluate(GOODCODEIN, GOODCODEOUT)
     gameAndGradeParser.pylintEvaluate(EMPTYCODEIN, EMPTYCODEOUT)
     gameAndGradeParser.pylintEvaluate(BADCODEIN, BADCODEOUT)