[Twisted-Python] Getting nice logging outputs in py.test

Thomas Westfeld thomas.westfeld at currenta.de
Fri Jul 5 04:27:29 MDT 2019


>> Dear all,
>>
>> I am having an issue with logging of my Twisted application. I am using the new
>twisted.logger framework. The output produced by twist or twistd when runnning my
>plugin is nice.
>>
>> However when running a test suite using py.test I only get this as an output to
>stdout:
>
>How are you running the reactor in your pytest suites? I've not found a
>sane way to do this and so would recommend sticking with trial, crufty
>and old though it feels...

Well actually I do not. I use the subprocess module to start the server using twist and then use requests in the tests to test the HTML server and compare the results with the expected results.

And yes py.test eats stdout but it is great as I need a good looking html test report which can be also customized and py.test gives me just this.

Sounds like there is no easy way of configuring a nice stdout log...


More information about the Twisted-Python mailing list