Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2189)

Issue 5698: #3939 ftplib tests (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 7 months ago by Benjamin
Modified:
14 years, 9 months ago
Reviewers:
billiejoex
Base URL:
http://svn.python.org/view/*checkout*/python/trunk/
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -35 lines) Patch
Lib/test/test_ftplib.py View 3 chunks +426 lines, -35 lines 4 comments Download

Messages

Total messages: 5
Benjamin
15 years, 7 months ago (2008-09-23 02:14:04 UTC) #1
Benjamin
Overall, great work! I just have a few comments. Also, it would be nice to ...
15 years, 7 months ago (2008-09-23 13:18:52 UTC) #2
billiejoex
> http://codereview.appspot.com/5698/diff/1/2#newcode16 > Line 16: HOST = test_support.HOST > This should be from "test.test_support import ...
15 years, 7 months ago (2008-09-23 15:44:26 UTC) #3
Benjamin
On 2008/09/23 15:44:26, billiejoex wrote: > > http://codereview.appspot.com/5698/diff/1/2#newcode28 > > Line 28: asyncore.dispatcher.__init__(self) > > ...
15 years, 7 months ago (2008-09-23 22:56:30 UTC) #4
billiejoex
15 years, 7 months ago (2008-09-24 00:01:30 UTC) #5
On 2008/09/23 13:18:52, Benjamin wrote:

> http://codereview.appspot.com/5698/diff/1/2#newcode16
> Line 16: HOST = test_support.HOST
> This should be from "test.test_support import HOST".

Done.

> http://codereview.appspot.com/5698/diff/1/2#newcode28
> Line 28: asyncore.dispatcher.__init__(self)
> "super()" should be used here.

Done as recommended by Benjamin.

> http://codereview.appspot.com/5698/diff/1/2#newcode33
> Line 33: self.handler = DummyFTPHandler
> This should be a class attribute.

Done.

> http://codereview.appspot.com/5698/diff/1/2#newcode318
> Line 318: # we don't have a reference of the data received on the server
> Couldn't you store the data in DummyFTPHandler and inspect it through
> self.client.handler?

Done.

> Also, it would be nice to see a few tests for bad server responses.

I added two tests for rename() and delete().
All the other ftplib.FTP methods implicitly uses ftplib.FTP.sendcmd/voidcmd
which are already tested against bad server responses in
TestFTPClass.test_exceptions and TestFTPClass.test_voidcmd.


I'm attaching the new patch on the Python bug tracker.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b