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

Jean-Paul Calderone exarkun at twistedmatrix.com
Fri Jul 5 05:24:08 MDT 2019


On Fri, Jul 5, 2019 at 1:55 AM Chris Withers <chris at withers.org> wrote:

> On 04/07/2019 21:43, Jean-Paul Calderone wrote:
> >     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...
> >
> >
> > What feels crufty and old about trial?  And why is "old" a negative?
>
> "old" is negative here because things have moved on and trial hasn't.
>
> pytest feels like it's become the python standard now, so there's that.
> It's rich ecosystem of plugins is another one.
> The reliance on subclassing TestCase is nother.
> No fixtures.
>

Just for anyone who's interested, if you use testtools TestCase then you
get fixtures and a load of other nice features.  This is what I almost
always do for new test development now.  Interoperability between different
libraries is one of the few nice things that comes from xUnit so trial can
load and run these tests.

Poor support in pycharm for trial versus first class support for pytest.
>
> That's just off the top of my head, use pytest for a year or two and
> coming back to trial may well feel the same.
>

Don't assume I haven't used pytest just because I don't immediately and
unquestioningly express complete agreement with you. :)

Anyhow, I am less interested in trying to convince you you're wrong than I
am in learning from your experience - hence the request to expand on your
assessment.

Jean-Paul


>
> cheers,
>
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20190705/ef115793/attachment-0002.html>


More information about the Twisted-Python mailing list