diff options
Diffstat (limited to 'Lib/test/test_dospath.py')
-rw-r--r-- | Lib/test/test_dospath.py | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/Lib/test/test_dospath.py b/Lib/test/test_dospath.py index ffa3ef7..08d32da 100644 --- a/Lib/test/test_dospath.py +++ b/Lib/test/test_dospath.py @@ -5,16 +5,16 @@ import os errors = 0 def tester(fn, wantResult): - fn = string.replace(fn, "\\", "\\\\") - gotResult = eval(fn) - if wantResult != gotResult: - print "error!" - print "evaluated: " + str(fn) - print "should be: " + str(wantResult) - print " returned: " + str(gotResult) - print "" - global errors - errors = errors + 1 + fn = string.replace(fn, "\\", "\\\\") + gotResult = eval(fn) + if wantResult != gotResult: + print "error!" + print "evaluated: " + str(fn) + print "should be: " + str(wantResult) + print " returned: " + str(gotResult) + print "" + global errors + errors = errors + 1 tester('dospath.splitdrive("c:\\foo\\bar")', ('c:', '\\foo\\bar')) tester('dospath.splitdrive("c:/foo/bar")', ('c:', '/foo/bar')) @@ -43,7 +43,6 @@ tester('dospath.commonprefix(["/home/swen/spam", "/home/swen/spam"])', "/home/swen/spam") if errors: - print str(errors) + " errors." + print str(errors) + " errors." else: - print "No errors. Thank your lucky stars." - + print "No errors. Thank your lucky stars." |