Hello,
In my course I'm trying to brainwash the students into integrating unit testing into their code development toolkit. CodeRunner is a fantastic tool for testing student code, and now I'm trying to use it to test code that tests student code.
Here's a ridiculously minimal example to illustrate an issue that I'm having:
import unittest
class Person:
pass
class PersonTest(unittest.TestCase):
def testWhatever(self):
pass
if __name__ == '__main__':
unittest.main()
The above code (the student answer) gives the following result:
The test runs, but where does the ***Error*** come from? (I can't see anything helpful when running with Template Debugging.)
Thanks in advance for helping.
The idea behind all this is to give some of the testing code in the Answer Box Preload, with the students then submitting their code + the unittest-ing code into CR. CR runs the unittest code which tests the student code.