Cosmetic: break the long lines in test_ntpath.py, and get rid of its

expected-output file.
This commit is contained in:
Tim Peters 2001-07-19 19:02:12 +00:00
parent d783041a14
commit 3b5e4d1e3c
2 changed files with 14 additions and 9 deletions

View file

@ -1,2 +0,0 @@
test_ntpath
No errors. Thank your lucky stars.

View file

@ -1,4 +1,5 @@
import ntpath
from test_support import verbose
import os
errors = 0
@ -15,16 +16,22 @@ def tester(fn, wantResult):
global errors
errors = errors + 1
tester('ntpath.splitdrive("c:\\foo\\bar")', ('c:', '\\foo\\bar'))
tester('ntpath.splitunc("\\\\conky\\mountpoint\\foo\\bar")', ('\\\\conky\\mountpoint', '\\foo\\bar'))
tester('ntpath.splitdrive("c:/foo/bar")', ('c:', '/foo/bar'))
tester('ntpath.splitunc("//conky/mountpoint/foo/bar")', ('//conky/mountpoint', '/foo/bar'))
tester('ntpath.splitdrive("c:\\foo\\bar")',
('c:', '\\foo\\bar'))
tester('ntpath.splitunc("\\\\conky\\mountpoint\\foo\\bar")',
('\\\\conky\\mountpoint', '\\foo\\bar'))
tester('ntpath.splitdrive("c:/foo/bar")',
('c:', '/foo/bar'))
tester('ntpath.splitunc("//conky/mountpoint/foo/bar")',
('//conky/mountpoint', '/foo/bar'))
tester('ntpath.split("c:\\foo\\bar")', ('c:\\foo', 'bar'))
tester('ntpath.split("\\\\conky\\mountpoint\\foo\\bar")', ('\\\\conky\\mountpoint\\foo', 'bar'))
tester('ntpath.split("\\\\conky\\mountpoint\\foo\\bar")',
('\\\\conky\\mountpoint\\foo', 'bar'))
tester('ntpath.split("c:\\")', ('c:\\', ''))
tester('ntpath.split("\\\\conky\\mountpoint\\")', ('\\\\conky\\mountpoint', ''))
tester('ntpath.split("\\\\conky\\mountpoint\\")',
('\\\\conky\\mountpoint', ''))
tester('ntpath.split("c:/")', ('c:/', ''))
tester('ntpath.split("//conky/mountpoint/")', ('//conky/mountpoint', ''))
@ -45,5 +52,5 @@ tester('ntpath.commonprefix(["/home/swen/spam", "/home/swen/spam"])',
if errors:
print str(errors) + " errors."
else:
elif verbose:
print "No errors. Thank your lucky stars."