Re: pytest-twisted questions
Kyle Altendorf <[email protected]>
| Newsgroups | gmane.comp.python.twisted |
|---|---|
| Message-ID | <[email protected]> |
On 2018-11-13 17:37, Chris Withers wrote: > On 13/11/2018 20:31, Kyle Altendorf wrote: >> but I know that I mostly don't have test classes and, for the class I >> do have, I didn't inherit. Mostly I just @pytest.inlineCallbacks (I >> still don't like the namespace squashing into pytest though :] ) and I >> suppose in the probably-not-too-distant future I'll instead be using >> more @pytest_twisted.async_await (ala #31/#34). > > Okay, but twisted.trial.unittest.TestCase does a bunch of reactor > management stuff, most notable making you aware when you've left the > reactor in a bad state. As far as I can see from the code, > pytest-twisted does not do that, correct? I don't believe so. It sounds like I should review twisted.trial.unittest.TestCase and consider implementing a fixture to provide the checks. Perhaps default it to autouse with a cli parameter to disable it. Perhaps #4 is relevant though. https://github.com/pytest-dev/pytest-twisted/issues/4 https://github.com/altendky/stlib/blob/b34796cbba959d9cb2cb843f3cc5fc815c7cb6c6/epyqlib/tests/utils/test_twisted.py#L65-L93 Cheers, -kyle _______________________________________________ Twisted-Python mailing list [email protected] https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python