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

Issue 32072: Add Tests for nturl2path module. Make it part of test_urllib per suggestion from Brett Cannon

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years ago by maksim_kozyarchuk
Modified:
13 years, 9 months ago
Reviewers:
Ezio Melotti, amaury
Base URL:
http://svn.python.org/view/*checkout*/python/branches/py3k/
Visibility:
Public.

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -0 lines) Patch
M Lib/test/test_urllib.py View 3 chunks +43 lines, -0 lines 7 comments Download

Messages

Total messages: 2
amaury
http://codereview.appspot.com/32072/diff/1/2 File Lib/test/test_urllib.py (right): http://codereview.appspot.com/32072/diff/1/2#newcode913 Line 913: if os.name == 'nt': This module is pure ...
14 years, 10 months ago (2009-06-26 19:13:50 UTC) #1
Ezio Melotti
13 years, 9 months ago (2010-07-10 07:02:09 UTC) #2
http://codereview.appspot.com/32072/diff/1/2
File Lib/test/test_urllib.py (right):

http://codereview.appspot.com/32072/diff/1/2#newcode913
Lib/test/test_urllib.py:913: if os.name == 'nt':
Using a proper skip would be better than a simple if.
See
http://docs.python.org/library/unittest.html#skipping-tests-and-expected-fail...

http://codereview.appspot.com/32072/diff/1/2#newcode918
Lib/test/test_urllib.py:918: self.assertEquals('C:', url2pathname("///C|"))
self.assertEqual (without 's') is the preferred form

http://codereview.appspot.com/32072/diff/1/2#newcode923
Lib/test/test_urllib.py:923: self.assertEquals('\\\\\\C\\test\\',
url2pathname("///C/test/"))
r'\\\C\test\' ?

http://codereview.appspot.com/32072/diff/1/2#newcode929
Lib/test/test_urllib.py:929: def
test_assert_raises_io_error_when_non_ascii__drive_letter(self):
s/ascii__drive/ascii_drive/
A name like test_non_ascii_drive_letter would probably be enough too.

http://codereview.appspot.com/32072/diff/1/2#newcode930
Lib/test/test_urllib.py:930: self.assertRaises( IOError, url2pathname,
"///\u0099|/" )
\u0099 is in the category 'Cc' ("Other, Control") so it sound unlikely for a
drive letter, but what about a char like \u00e8 ('รจ') ?
There are also two extra spaces after the '(' and before the ')'.

http://codereview.appspot.com/32072/diff/1/2#newcode951
Lib/test/test_urllib.py:951: class PathName2URLTests(unittest.TestCase): pass
This "else" can be removed if a proper skip is used.
Sign in to reply to this message.

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