Tests and logging - pytest-capturelog

Thomas De Schampheleire patrickdepinguin at gmail.com
Sun May 29 19:11:53 UTC 2016


On Tue, May 24, 2016 at 9:13 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> Hi
>
> Writing or debugging Kallithea tests can be frustrating. One reason is that
> there is no logging (AFAICS).
>
> I just found
>
> pip install pytest-capturelog
>
> which will make log output show up for failing tests. That seems to be very
> helpful! (It would perhaps be even more helpful if it showed up interleaved
> with stdout output ... but that is no big deal.)
>
> Does this trick work for you too? Or do you have other similar tricks?

Works for me, nice find! I'd say: add it to the requirements.

In the current turbogears situation I had disabled all logging, as
there were some database logs that kept appearing and I did not find
how to silence them (and the actual test logs were not shown anyway).
I need to disable that disabling to benefit from pytest-capturelog, so
I'll need to find another solution for the annoying logs. More on that
later...

/Thomas


More information about the kallithea-general mailing list