[Twisted-Python] Error (and response) handling in protocols

Jason Heeris jason.heeris at gmail.com
Mon Feb 21 09:06:18 EST 2011


On 21 February 2011 21:30,  <exarkun at twistedmatrix.com> wrote:
> Not intentionally:
>
>  http://twistedmatrix.com/trac/ticket/3690

Interesting...

As an aside, the problem of serial port availability for unit tests is
something I've encountered before too. I solved it by using "socat" to
create virtual serial ports with known names (paths on *nix, COM
numbers on Windows), and ran my tests using that. In fact, the test
for the patch in #3690 only requires that the port exists, not that it
does anything, which is even easier than actually requiring the port
to do anything.

I don't know if that's viable for a Twisted test though, since it's an
external binary. Maybe the functionality could be replicated in pure
Python, but that'd be a lot of work.

— Jason



More information about the Twisted-Python mailing list