mirror of
https://github.com/python/cpython
synced 2026-09-29 10:35:30 +03:00
Cosmetic: break the long lines in test_ntpath.py, and get rid of its
expected-output file.
This commit is contained in:
parent
d783041a14
commit
3b5e4d1e3c
2 changed files with 14 additions and 9 deletions
|
|
@ -1,2 +0,0 @@
|
|||
test_ntpath
|
||||
No errors. Thank your lucky stars.
|
||||
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue