Provide a way to pass in a summary_writer to a test
For example an API similar to xmlrunner in unittest here : https://github.com/xmlrunner/unittest-xml-reporting#usage
We could similarly do: import custom_summary_writer ... if name == 'main': test_runner.main(summary_writer=custom_summary_writer.Writer(option='foo'))
what would option='foo' do?
There are actually better ways to achieve customizeable output formats. Here's an example.
If the test case simply emits synchronous signals, as defined here: https://github.com/kdart/pycopia3/blob/master/QA/pycopia/QA/signals.py and used here: https://github.com/kdart/pycopia3/blob/master/QA/pycopia/QA/core.py#L273 Then any output module can be a subscriber to the signal stream, as defined here: https://github.com/kdart/pycopia3/blob/master/QA/pycopia/reports/init.py And implemented here: https://github.com/kdart/pycopia3/blob/master/QA/pycopia/reports/default.py Which provides a more user-friendly output to the console that contains color and line drawing characters. Other output modules can be written (not included there) that, say, write HTML, or YAML, or to a database, or other storage.
In other words, the pub-sub pattern.
Obsolete