Add Tests for nturl2path module. Make it part of test_urllib per suggestion from Brett Cannon - Code Review (original) (raw)
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.