Trial could produce a warning for tests that return a generator, or pass the generator to defer._inlineCallbacks
| Newsgroups | gmane.comp.python.twisted.bugs |
|---|---|
| Message-ID | <[email protected]> |
New submission from terrycojones <[email protected]>: I just added a test to an existing test suite and ran it. It passed, but I was uncomfortable because it seemed to complete too quickly. I changed an assert to its opposite and the test still passed. Hmm... I realized I was yielding deferreds in the test, but had omitted the @defer.inlineCallbacks decorator. So when trial called my test, it got back a generator and thought it was done. I think it would be nice if trial detected this and either logged a warning or passed the generator to defer._inlineCallbacks. While doing the latter might be considered overkill, a warning is at least in order. ---------- Type : enhancement Component: trial Keywords : Priority : normal Nosy : [email protected] ---------- http://twistedmatrix.com/trac/ticket/3917