curl-and-python

Re: Test suite dependencies

From: Oleg Pudeyev <oleg+pycurl_at_bsdpower.com>
Date: Sun, 3 Mar 2013 13:39:10 -0500

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

> 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.

If you don't mind then, given this test:

https://github.com/p/pycurl/blob/master/tests/test_ftp.py

How should I check that QUOTE command is executed, using curl's
ftpserver?

Here is what I have so far:

https://github.com/p/pycurl/blob/python3/tests/ftp_test.py#L27

> 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...
>

My initial (and current) goal is to create a coherent test suite from
existing test code. Baby steps and all that.

Do you have any suggestions for how pycurl->libcurl translation should
be checked?

Even so, such translation tests would qualify as unit tests, and while
they are a good idea in my opinion I would not want to completely
get rid of existing tests which are rather functional/acceptance
tests.

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