[Twisted-Python] tcp error

Andrew Bennetts andrew-twisted at puzzling.org
Tue Jul 11 20:14:08 EDT 2006

On Tue, Jul 11, 2006 at 07:45:16PM +0200, Michele Petrazzo wrote:
> >By only looking at the traceback, it is not entirely clear where the 
> >problem lies.  Please include a minimal self-contained example which 
> >reproduces this traceback or a unit test which fails because of this 
> >problem.
> >
> This is difficult to do, because it's a ftp client library that connect
> fax client to an hylafax server (that act like an ftp server), so you
> have to setup one for try... Of course, if you have one, I'll send you
> all the needs for try.

FTP client tests don't necessary need a "real" FTP server to connect to -- and
any test that does is certainly not a "unit" test.  Often to test protocol logic
all you need is a transcript of a session from a real server that you can play
back to the client (not even necessarily over a real TCP connection).

See test_ftp.py in Twisted for some examples of tests that don't need a full
client and server on both ends to test behaviour.  (And some that do, as well)


More information about the Twisted-Python mailing list