[Twisted-Python] FAILED (failures=1, errors=1164)

Glyph Lefkowitz glyph at twistedmatrix.com
Wed Sep 25 03:46:52 EDT 2002

On Wed, 25 Sep 2002 14:19:21 +1000, Andrew Bennetts <andrew-twisaed at puzzling.org> wrote:
> Running:
>   PYTHONPATH=. python admin/runtests -t poll

Woah.  We should have different-reactor unit test running in the coding
standard too, apparently :-(.

>   FAILED (failures=1, errors=1164)

> Now, considering that we don't have that many tests, something is *really*
> screwy.

There are some hacks in the pyunit shipped with Twisted to make it interpret
each failed deferred as a separate error.  This means some tests can produce
quite a few more errors than you might expect :-).

> The vast bulk are:
> ======================================================================
> ERROR: testPBFailures (twisted.test.test_pbfailure.PBFailureTest)
> ----------------------------------------------------------------------
> (yes, with no traceback)

Yeah, this happens with Failures that are instantiated rather than raised.  I
guess there should be a debug mode where _all_ failures save their stack, that
the unit tests use...

> Anyone know what's going on here?  I'm running debian testing/unstable.

This is fixed now.  There is still one error in the pollreactor unit tests,
but that has something to do with UDP, and seems tricky enough that I'm keeping
my nose out of it for now.

What was happening was that the poll reactor was assuming that obj.fileno()
would always return a valid descriptor.  Since this has never been the case,
and one of the failure cases that causes the remove-descriptor code to get run
(and fileno() to get called) is that fileno() raises an exception, things
didn't work.  Obviously there was some circularity there, and you'd get a
double-traceback and a corrupted reactor, leaving sockets in it which would
raise these same exceptions every time .iterate() was run.  Hence the very
large number of errors.

The code that's in there now is a bit slow in the failure case I described, but
it works.  At some point we should probably have a cleaner solution to this
problem in general.

 |    <`'>    |  Glyph Lefkowitz: Traveling Sorcerer   |
 |   < _/ >   |  Lead Developer,  the Twisted project  |
 |  < ___/ >  |      http://www.twistedmatrix.com      |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20020925/03107eaa/attachment.pgp 

More information about the Twisted-Python mailing list