Closed Feelx234 closed 4 years ago
Turns out this is a Windows specific problem. Now, an archive is deleted rather than overwritten which should solve the problem (see 8d1d59d9e733de810e2a61ba4d0e09f2ea1e8a3a).
Further, test execution (NotebookTest.execute
) returns the number of failed tests as exit code which eases scripting (see c0576fdeb402096215dea490059cad4e371a4de8). However, if you're really interested in test results while developing a test, call NotebookTest.grade_notebook
directly in order to get the result dictionary.
As I don't have access to a Windows machine to test things, I leave this issues open until I get confirmation of this problem being solved. @Feelx234 your turn ;)
Solved, thanks!
Scenario: While writing your checker_script, you might want to see the output of the test directly without recreating the entire archive. Also creating the archive multiple times is problematic as a FileExistsError is raised when the same notebook is created multiple times for the same (dummy) Team. I would suggest providing a function like this:
Note that this function still outputs the code.py file. Then in your python test script you can do
Having such a file would also writing tests for autograde much easier as you can isolate the test_result from the archive.