I'm trying to find a nice way to automate grading some students' code. Each of the students is going to submit a file with a name something like homework1_studentName.py
, and I'm going to download them all and put them in a folder.
Now each student should have a bunch of functions like def question1(args):
in their file that I'm trying to grade. My goal is to make a grading script in that directory that iterates through each student's module, imports the code, runs the functions against some predefined test cases and then prints the output. Is there a way to do this nicely?
It'd save a ton of time to just run the grading script once (after downloading all of their code) than to have to grade each file separately.