Re: Getting nice logging outputs in py.test

Thomas Westfeld <[email protected]> Fri, 5 Jul 2019 10:27:29 +0000
Newsgroups gmane.comp.python.twisted
Message-ID <[email protected]>
>> 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...
_______________________________________________
Twisted-Python mailing list
[email protected]
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python