mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Make reindent.py happy (convert everything to 4-space indents!).
This commit is contained in:
parent
2e6d25c5bb
commit
004d5e6880
70 changed files with 1215 additions and 1247 deletions
|
@ -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('ntpath.splitdrive("c:\\foo\\bar")', ('c:', '\\foo\\bar'))
|
||||
tester('ntpath.splitunc("\\\\conky\\mountpoint\\foo\\bar")', ('\\\\conky\\mountpoint', '\\foo\\bar'))
|
||||
|
@ -45,7 +45,6 @@ tester('ntpath.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."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue