[Python-checkins] r52598 - in python/trunk/Lib: smtplib.py test/test_MimeWriter.py test/test___future__.py test/test_bufio.py test/test_codecs.py test/test_grammar.py test/test_mailbox.py test/test_math.py test/test_mmap.py test/test_poll.py test/test_scope.py test/test_structmembers.py
tim.peters
python-checkins at python.org
Fri Nov 3 03:32:48 CET 2006
Author: tim.peters
Date: Fri Nov 3 03:32:46 2006
New Revision: 52598
Modified:
python/trunk/Lib/smtplib.py
python/trunk/Lib/test/test_MimeWriter.py
python/trunk/Lib/test/test___future__.py
python/trunk/Lib/test/test_bufio.py
python/trunk/Lib/test/test_codecs.py
python/trunk/Lib/test/test_grammar.py
python/trunk/Lib/test/test_mailbox.py
python/trunk/Lib/test/test_math.py
python/trunk/Lib/test/test_mmap.py
python/trunk/Lib/test/test_poll.py
python/trunk/Lib/test/test_scope.py
python/trunk/Lib/test/test_structmembers.py
Log:
Whitespace normalization.
Modified: python/trunk/Lib/smtplib.py
==============================================================================
--- python/trunk/Lib/smtplib.py (original)
+++ python/trunk/Lib/smtplib.py Fri Nov 3 03:32:46 2006
@@ -729,7 +729,7 @@
support). If host is not specified, '' (the local host) is used. If port is
omitted, the standard SMTP-over-SSL port (465) is used. keyfile and certfile
are also optional - they can contain a PEM formatted private key and
- certificate chain file for the SSL connection.
+ certificate chain file for the SSL connection.
"""
def __init__(self, host = '', port = 0, local_hostname = None,
keyfile = None, certfile = None):
Modified: python/trunk/Lib/test/test_MimeWriter.py
==============================================================================
--- python/trunk/Lib/test/test_MimeWriter.py (original)
+++ python/trunk/Lib/test/test_MimeWriter.py Fri Nov 3 03:32:46 2006
@@ -192,7 +192,7 @@
'''
class MimewriterTest(unittest.TestCase):
-
+
def test(self):
buf = StringIO.StringIO()
Modified: python/trunk/Lib/test/test___future__.py
==============================================================================
--- python/trunk/Lib/test/test___future__.py (original)
+++ python/trunk/Lib/test/test___future__.py Fri Nov 3 03:32:46 2006
@@ -50,7 +50,7 @@
check(mandatory, "mandatory")
a(optional < mandatory,
"optional not less than mandatory, and mandatory not None")
-
+
a(hasattr(value, "compiler_flag"),
"feature is missing a .compiler_flag attr")
a(isinstance(getattr(value, "compiler_flag"), int),
Modified: python/trunk/Lib/test/test_bufio.py
==============================================================================
--- python/trunk/Lib/test/test_bufio.py (original)
+++ python/trunk/Lib/test/test_bufio.py Fri Nov 3 03:32:46 2006
@@ -36,7 +36,7 @@
os.unlink(test_support.TESTFN)
except:
pass
-
+
def drive_one(self, pattern):
for length in lengths:
# Repeat string 'pattern' as often as needed to reach total length
Modified: python/trunk/Lib/test/test_codecs.py
==============================================================================
--- python/trunk/Lib/test/test_codecs.py (original)
+++ python/trunk/Lib/test/test_codecs.py Fri Nov 3 03:32:46 2006
@@ -911,7 +911,7 @@
self.assertEquals(f.readlines(), [u'\ud55c\n', u'\uae00'])
class EncodedFileTest(unittest.TestCase):
-
+
def test_basic(self):
f = StringIO.StringIO('\xed\x95\x9c\n\xea\xb8\x80')
ef = codecs.EncodedFile(f, 'utf-16-le', 'utf-8')
@@ -1172,7 +1172,7 @@
decoder = codecs.getincrementaldecoder(encoding)("ignore")
decodedresult = u"".join(decoder.decode(c) for c in encodedresult)
self.assertEqual(decodedresult, s, "%r != %r (encoding=%r)" % (decodedresult, s, encoding))
-
+
encodedresult = "".join(cencoder.encode(c) for c in s)
cdecoder = _testcapi.codec_incrementaldecoder(encoding, "ignore")
decodedresult = u"".join(cdecoder.decode(c) for c in encodedresult)
Modified: python/trunk/Lib/test/test_grammar.py
==============================================================================
--- python/trunk/Lib/test/test_grammar.py (original)
+++ python/trunk/Lib/test/test_grammar.py Fri Nov 3 03:32:46 2006
@@ -123,10 +123,10 @@
# single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE
# XXX can't test in a script -- this rule is only used when interactive
-
+
# file_input: (NEWLINE | stmt)* ENDMARKER
# Being tested as this very moment this very module
-
+
# expr_input: testlist NEWLINE
# XXX Hard to test -- used only in calls to input()
@@ -329,7 +329,7 @@
# which is not available in unittest.
save_stdout = sys.stdout
sys.stdout = StringIO.StringIO()
-
+
print 1, 2, 3
print 1, 2, 3,
print
@@ -563,7 +563,7 @@
elif 0: pass
elif 0: pass
else: pass
-
+
def testWhile(self):
# 'while' test ':' suite ['else' ':' suite]
while 0: pass
@@ -696,7 +696,7 @@
def testSelectors(self):
### trailer: '(' [testlist] ')' | '[' subscript ']' | '.' NAME
### subscript: expr | [expr] ':' [expr]
-
+
import sys, time
c = sys.path[0]
x = time.time()
Modified: python/trunk/Lib/test/test_mailbox.py
==============================================================================
--- python/trunk/Lib/test/test_mailbox.py (original)
+++ python/trunk/Lib/test/test_mailbox.py Fri Nov 3 03:32:46 2006
@@ -754,15 +754,15 @@
key1 = self._box.add(msg)
self._box.flush()
self._box.close()
-
+
self._box = self._factory(self._path)
self._box.lock()
key2 = self._box.add(msg)
self._box.flush()
self.assert_(self._box._locked)
self._box.close()
-
-
+
+
class TestMbox(_TestMboxMMDF):
Modified: python/trunk/Lib/test/test_math.py
==============================================================================
--- python/trunk/Lib/test/test_math.py (original)
+++ python/trunk/Lib/test/test_math.py Fri Nov 3 03:32:46 2006
@@ -152,7 +152,7 @@
testmodf('modf(1.5)', math.modf(1.5), (0.5, 1.0))
testmodf('modf(-1.5)', math.modf(-1.5), (-0.5, -1.0))
-
+
def testPow(self):
self.assertRaises(TypeError, math.pow)
self.ftest('pow(0,1)', math.pow(0,1), 0)
Modified: python/trunk/Lib/test/test_mmap.py
==============================================================================
--- python/trunk/Lib/test/test_mmap.py (original)
+++ python/trunk/Lib/test/test_mmap.py Fri Nov 3 03:32:46 2006
@@ -218,7 +218,7 @@
# Ensuring copy-on-write maps cannot be resized
self.assertRaises(TypeError, m.resize, 2*mapsize)
del m, f
-
+
# Ensuring invalid access parameter raises exception
f = open(TESTFN, "r+b")
self.assertRaises(ValueError, mmap.mmap, f.fileno(), mapsize, access=4)
Modified: python/trunk/Lib/test/test_poll.py
==============================================================================
--- python/trunk/Lib/test/test_poll.py (original)
+++ python/trunk/Lib/test/test_poll.py Fri Nov 3 03:32:46 2006
@@ -21,7 +21,7 @@
def test_poll1(self):
# Basic functional test of poll object
# Create a bunch of pipe and test that poll works with them.
-
+
p = select.poll()
NUM_PIPES = 12
Modified: python/trunk/Lib/test/test_scope.py
==============================================================================
--- python/trunk/Lib/test/test_scope.py (original)
+++ python/trunk/Lib/test/test_scope.py Fri Nov 3 03:32:46 2006
@@ -8,7 +8,7 @@
class ScopeTests(unittest.TestCase):
def testSimpleNesting(self):
-
+
def make_adder(x):
def adder(y):
return x + y
Modified: python/trunk/Lib/test/test_structmembers.py
==============================================================================
--- python/trunk/Lib/test/test_structmembers.py (original)
+++ python/trunk/Lib/test/test_structmembers.py Fri Nov 3 03:32:46 2006
@@ -43,11 +43,11 @@
def has_warned(self):
self.assertEqual(test.test_warnings.msg.category,
exceptions.RuntimeWarning.__name__)
-
+
def test_byte_max(self):
ts.T_BYTE=CHAR_MAX+1
self.has_warned()
-
+
def test_byte_min(self):
ts.T_BYTE=CHAR_MIN-1
self.has_warned()
@@ -68,7 +68,7 @@
ts.T_USHORT=USHRT_MAX+1
self.has_warned()
-
+
def test_main(verbose=None):
test_support.run_unittest(
More information about the Python-checkins
mailing list