Overriding Python Unit Test module for custom output? [code updated]
问题 Edit : solved! Will update shortly with a solution. Aim: I want to rewrite Python's UnitTest module so when I call it I get the following JSON output within the stdout stream. For example: { "errors":0, "failures":1, "ran":3, "skipped":0, "successful":2, "test_data":[ { "index":0, "result":1 }, { "index":1, "result":1 }, { "index":2, "result":-1 } ] } Problem: I've written some code to generate these test results, but I'm facing problems with writing code for the test_data attribute of the