mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +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
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
# Regex test suite and benchmark suite v1.5a2
|
# Regex test suite and benchmark suite v1.5a2
|
||||||
# Due to the use of r"aw" strings, this file will
|
# Due to the use of r"aw" strings, this file will
|
||||||
# only work with Python 1.5 or higher.
|
# only work with Python 1.5 or higher.
|
||||||
|
@ -286,4 +285,3 @@ tests = [
|
||||||
('a\>', 'a!', SUCCEED, 'found', 'a'),
|
('a\>', 'a!', SUCCEED, 'found', 'a'),
|
||||||
('a\>', 'a', SUCCEED, 'found', 'a'),
|
('a\>', 'a', SUCCEED, 'found', 'a'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -21,4 +21,3 @@ def main():
|
||||||
getattr(al, attr)
|
getattr(al, attr)
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
@ -185,4 +185,3 @@ def testtype(type, example):
|
||||||
|
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
# Augmented assignment test.
|
# Augmented assignment test.
|
||||||
|
|
||||||
x = 2
|
x = 2
|
||||||
|
@ -229,4 +228,3 @@ x >>= 1
|
||||||
x << 1
|
x << 1
|
||||||
1 << x
|
1 << x
|
||||||
x <<= 1
|
x <<= 1
|
||||||
|
|
||||||
|
|
|
@ -216,4 +216,3 @@ testme = ExtraTests()
|
||||||
testme.spam
|
testme.spam
|
||||||
testme.eggs = "spam, spam, spam and ham"
|
testme.eggs = "spam, spam, spam and ham"
|
||||||
del testme.cardinal
|
del testme.cardinal
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
# Simple test suite for Cookie.py
|
# Simple test suite for Cookie.py
|
||||||
|
|
||||||
import Cookie
|
import Cookie
|
||||||
|
@ -37,4 +36,3 @@ C.load('Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"')
|
||||||
assert C['Customer'].value == 'WILE_E_COYOTE'
|
assert C['Customer'].value == 'WILE_E_COYOTE'
|
||||||
assert C['Customer']['version'] == '1'
|
assert C['Customer']['version'] == '1'
|
||||||
assert C['Customer']['path'] == '/acme'
|
assert C['Customer']['path'] == '/acme'
|
||||||
|
|
||||||
|
|
|
@ -46,4 +46,3 @@ if errors:
|
||||||
print str(errors) + " errors."
|
print str(errors) + " errors."
|
||||||
else:
|
else:
|
||||||
print "No errors. Thank your lucky stars."
|
print "No errors. Thank your lucky stars."
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import os
|
||||||
import base64
|
import base64
|
||||||
import gettext
|
import gettext
|
||||||
|
|
||||||
|
|
||||||
def test_api_1(localedir, mofile):
|
def test_api_1(localedir, mofile):
|
||||||
print 'test api 1'
|
print 'test api 1'
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ gettext message catalog library.''')
|
||||||
print _('mullusk')
|
print _('mullusk')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_api_2(localedir, mofile):
|
def test_api_2(localedir, mofile):
|
||||||
print 'test api 2'
|
print 'test api 2'
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ gettext message catalog library.''')
|
||||||
return gettext.dgettext('gettext')
|
return gettext.dgettext('gettext')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GNU_MO_DATA = '''\
|
GNU_MO_DATA = '''\
|
||||||
3hIElQAAAAAFAAAAHAAAAEQAAAAHAAAAbAAAAAAAAACIAAAAFQAAAIkAAAChAAAAnwAAAAcAAABB
|
3hIElQAAAAAFAAAAHAAAAEQAAAAHAAAAbAAAAAAAAACIAAAAFQAAAIkAAAChAAAAnwAAAAcAAABB
|
||||||
AQAACwAAAEkBAAAbAQAAVQEAABYAAABxAgAAoQAAAIgCAAAFAAAAKgMAAAkAAAAwAwAAAQAAAAQA
|
AQAACwAAAEkBAAAbAQAAVQEAABYAAABxAgAAoQAAAIgCAAAFAAAAKgMAAAkAAAAwAwAAAQAAAAQA
|
||||||
|
@ -123,7 +123,7 @@ bCBjZWJpdnF2YXQgbmEgdmFncmVzbnByIGdiIGd1ciBUQUgKdHJnZ3JrZyB6cmZmbnRyIHBuZ255
|
||||||
YnQgeXZvZW5lbC4AYmFjb24Ad2luayB3aW5rAA==
|
YnQgeXZvZW5lbC4AYmFjb24Ad2luayB3aW5rAA==
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
LOCALEDIR = os.path.join('xx', 'LC_MESSAGES')
|
LOCALEDIR = os.path.join('xx', 'LC_MESSAGES')
|
||||||
MOFILE = os.path.join(LOCALEDIR, 'gettext.mo')
|
MOFILE = os.path.join(LOCALEDIR, 'gettext.mo')
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ finally:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# For reference, here's the .po file used to created the .mo data above.
|
# For reference, here's the .po file used to created the .mo data above.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
import gzip, tempfile
|
import gzip, tempfile
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,3 @@ same_hash(int(1), long(1), float(1), complex(1))
|
||||||
same_hash(long(1.23e300), float(1.23e300))
|
same_hash(long(1.23e300), float(1.23e300))
|
||||||
|
|
||||||
same_hash(float(0.5), complex(0.5, 0.0))
|
same_hash(float(0.5), complex(0.5, 0.0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -257,4 +257,3 @@ test_division()
|
||||||
test_bitop_identities()
|
test_bitop_identities()
|
||||||
test_format()
|
test_format()
|
||||||
test_misc()
|
test_misc()
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import mmap
|
import mmap
|
||||||
import string, os, re, sys
|
import string, os, re, sys
|
||||||
|
|
||||||
|
|
|
@ -48,4 +48,3 @@ if errors:
|
||||||
print str(errors) + " errors."
|
print str(errors) + " errors."
|
||||||
else:
|
else:
|
||||||
print "No errors. Thank your lucky stars."
|
print "No errors. Thank your lucky stars."
|
||||||
|
|
||||||
|
|
|
@ -19,4 +19,3 @@ if not os.isatty(slave):
|
||||||
|
|
||||||
os.write(slave, 'Ping!')
|
os.write(slave, 'Ping!')
|
||||||
print os.read(master, 1024)
|
print os.read(master, 1024)
|
||||||
|
|
||||||
|
|
|
@ -39,4 +39,3 @@ if errors:
|
||||||
print str(errors) + " errors."
|
print str(errors) + " errors."
|
||||||
else:
|
else:
|
||||||
print "No errors. Thank your lucky stars."
|
print "No errors. Thank your lucky stars."
|
||||||
|
|
||||||
|
|
|
@ -88,4 +88,3 @@ else:
|
||||||
os.close(master_fd)
|
os.close(master_fd)
|
||||||
|
|
||||||
# pty.fork() passed.
|
# pty.fork() passed.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
# regression test for SAX 2.0
|
# regression test for SAX 2.0
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
|
|
|
@ -60,4 +60,3 @@ def test():
|
||||||
p.close()
|
p.close()
|
||||||
|
|
||||||
test()
|
test()
|
||||||
|
|
||||||
|
|
|
@ -35,4 +35,3 @@ string_tests.run_method_tests(test)
|
||||||
string.whitespace
|
string.whitespace
|
||||||
string.lowercase
|
string.lowercase
|
||||||
string.uppercase
|
string.uppercase
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,3 @@ file = open(findfile('tokenize_tests.py'))
|
||||||
tokenize.tokenize(file.readline)
|
tokenize.tokenize(file.readline)
|
||||||
if verbose:
|
if verbose:
|
||||||
print 'finished'
|
print 'finished'
|
||||||
|
|
||||||
|
|
|
@ -79,4 +79,3 @@ except UnicodeError:
|
||||||
else:
|
else:
|
||||||
raise AssertionError, "failed to raise an exception for a missing opening brace."
|
raise AssertionError, "failed to raise an exception for a missing opening brace."
|
||||||
print "done."
|
print "done."
|
||||||
|
|
||||||
|
|
|
@ -515,4 +515,3 @@ assert (u"abc" "def") == u"abcdef"
|
||||||
assert (u"abc" u"def" "ghi") == u"abcdefghi"
|
assert (u"abc" u"def" "ghi") == u"abcdefghi"
|
||||||
assert ("abc" "def" u"ghi") == u"abcdefghi"
|
assert ("abc" "def" u"ghi") == u"abcdefghi"
|
||||||
print 'done.'
|
print 'done.'
|
||||||
|
|
||||||
|
|
|
@ -28,5 +28,3 @@ out2_2 = "abc?def"
|
||||||
|
|
||||||
assert urllib.quote(in2) == out2_1, "urllib.quote problem"
|
assert urllib.quote(in2) == out2_1, "urllib.quote problem"
|
||||||
assert urllib.quote(in2, '?') == out2_2, "urllib.quote problem"
|
assert urllib.quote(in2, '?') == out2_2, "urllib.quote problem"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -144,4 +144,3 @@ if remote_name is not None:
|
||||||
else:
|
else:
|
||||||
print "Remote registry calls can be tested using",
|
print "Remote registry calls can be tested using",
|
||||||
print "'test_winreg.py --remote \\\\machine_name'"
|
print "'test_winreg.py --remote \\\\machine_name'"
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,3 @@ import winsound
|
||||||
for i in range(100, 2000, 100):
|
for i in range(100, 2000, 100):
|
||||||
winsound.Beep(i, 75)
|
winsound.Beep(i, 75)
|
||||||
print "Hopefully you heard some sounds increasing in frequency!"
|
print "Hopefully you heard some sounds increasing in frequency!"
|
||||||
|
|
||||||
|
|
|
@ -23,4 +23,3 @@ finally:
|
||||||
os.unlink(srcname)
|
os.unlink(srcname)
|
||||||
if os.path.isfile(zipname):
|
if os.path.isfile(zipname):
|
||||||
os.unlink(zipname)
|
os.unlink(zipname)
|
||||||
|
|
||||||
|
|
|
@ -158,4 +158,3 @@ LAERTES
|
||||||
|
|
||||||
Farewell.
|
Farewell.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue