Skip to content

Add post_processor callback to JSONTestRunner

Compare
Choose a tag to compare
@ibrahima ibrahima released this 11 Jun 18:43
· 62 commits to master since this release

Adds a callback function to JSONTestRunner which can be used to modify the autograder results at the end of the test suite but before they are written to disk.

Usage Example:

def post_process(results):
    results["score"] = 9001

if __name__ == '__main__':
    suite = unittest.defaultTestLoader.discover('tests')

    JSONTestRunner(visibility='visible', post_processor=post_process).run(suite)

#16