Re: code coverage when code executed in a twisted worker thread
Chris Withers <[email protected]> Mon, 3 Dec 2018 08:04:13 +0000
| Newsgroups | gmane.comp.python.twisted |
|---|---|
| Message-ID | <[email protected]> |
On 01/12/2018 16:09, Kyle Altendorf wrote: > > > On November 29, 2018 8:10:41 AM EST, Chris Withers <[email protected]> wrote: >> I've noticed that code coverage doesn't appear to be recorded when code >> >> is executed in something that has been deferToThread'ed. >> >> Is this a known issue? Does anyone have an explanation? > > Are you using coverage.py? I don't know offhand but does Twisted use `thread` or `threading`? > > https://coverage.readthedocs.io/en/coverage-4.2/trouble.html#things-that-don-t-work You have to be using one of those to use threads in Python. Does Twisted use the older/lower level `thread` library? Chris _______________________________________________ Twisted-Python mailing list [email protected] https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python