Currently the statistics feature is only accessible from pytest.
Most of the functionality is generic (though not part of the public API) but the actual generation of the report is currently pytest specific. It would be nice if it weren't, and if there were at least some basic API for it.
I'm imagining something along the lines of at show_statistics() function that prints the statistics of the last test run to a file object. It's... less than modular, but this feature is somewhat intrinsically built on global state anyway because of the way it has to interact with test runners.
Currently the statistics feature is only accessible from pytest.
Most of the functionality is generic (though not part of the public API) but the actual generation of the report is currently pytest specific. It would be nice if it weren't, and if there were at least some basic API for it.
I'm imagining something along the lines of at show_statistics() function that prints the statistics of the last test run to a file object. It's... less than modular, but this feature is somewhat intrinsically built on global state anyway because of the way it has to interact with test runners.