curl-and-python

Re: Test suite dependencies

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 3 Mar 2013 19:12:27 +0100 (CET)

On Sun, 3 Mar 2013, Oleg Pudeyev wrote:

> I found ftpserver.pl in curl test suite and tried it. Unfortunately it
> appears to not implement any sort of directory browsing (regardless of
> directory changes it returns the same content when listing files)

(I've been away so I haven't been able to respond to this thread earlier)

The FTP server in the curl test suite is in fact also a IMAP, SMTP and POP3
test server. It follows the same tradition as the HTTP server there: they are
as stupid as possible so that the test case clearly tells it what to respond
to the particular requests that the test case entails.

So, if test 1 would return a directory listing, then test 1 will tell the FTP
server exactly how that would look. That makes it very easy to make the server
respond in very weird ways that may be non-compliant or whatever - at will.

That's basically how we do all the test cases in curl, and that's why I don't
consider using a "standard" server for doing protocol tests since such servers
are designed to actually always adhere to the protocols in question.

But lastly, does pycurl really need to double-check the actual underlying
protocol implementation? You'd basically only be verifying that the existing
curl test suite is good enough, for no particular extra value.

I would say that you should rather make an effort to make sure that a certain
set of pycurl code gets translated into a certain chain of libcurl calls. But
maybe that's just how I view things...

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2013-03-03