Closed aivarannamaa closed 10 years ago
It is, you "only" have to write your own test wrapper (https://github.com/macobo/python-grader/blob/master/grader/test_wrappers.py) around it. I'll try document the process of writing tests (and wrappers) soon, but perhaps this will help you get started. You could also change the existing check_function wrapper, adding an optional parameter runs?
Other times, we may want to execute separate tests in separate processes.
If the global environment for the users program is reset, it shouldn't make a difference since the user program cannot see who is "importing" or executing it.
As said above, the correct thing to do would be to write your own wrapper.
Sometimes we may want to test one function with different inputs without resetting the environment. This would catch the bugs where student's function works correctly only at first call. Is this possible at the moment?
Other times, we may want to execute separate tests in separate processes.