Whitespace normalization
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index 8c2a979..6d6e378 100644
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -921,7 +921,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')
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index ff7b39d..b67dbe3 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -245,7 +245,7 @@
if hasattr(curses, 'resizeterm'):
lines, cols = curses.LINES, curses.COLS
curses.resizeterm(lines - 1, cols + 1)
-
+
if curses.LINES != lines - 1 or curses.COLS != cols + 1:
raise RuntimeError, "Expected resizeterm to update LINES and COLS"
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index a29f404..a9ee5bc 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1216,7 +1216,7 @@
except NameError:
pass
else:
- # _unicode_to_string used to modify slots in certain circumstances
+ # _unicode_to_string used to modify slots in certain circumstances
slots = (unicode("foo"), unicode("bar"))
class C(object):
__slots__ = slots
@@ -1231,7 +1231,7 @@
except (TypeError, UnicodeEncodeError):
pass
else:
- raise TestFailed, "[unichr(128)] slots not caught"
+ raise TestFailed, "[unichr(128)] slots not caught"
# Test leaks
class Counted(object):
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index ed97f84..eee147e 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -224,13 +224,13 @@
test_import_initless_directory_warning()
def test_infinite_reload():
- # Bug #742342 reports that Python segfaults (infinite recursion in C)
- # when faced with self-recursive reload()ing.
+ # Bug #742342 reports that Python segfaults (infinite recursion in C)
+ # when faced with self-recursive reload()ing.
- sys.path.insert(0, os.path.dirname(__file__))
- try:
- import infinite_reload
- finally:
- sys.path.pop(0)
+ sys.path.insert(0, os.path.dirname(__file__))
+ try:
+ import infinite_reload
+ finally:
+ sys.path.pop(0)
test_infinite_reload()
diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py
index 264e237..18e6b67 100644
--- a/Lib/test/test_mailbox.py
+++ b/Lib/test/test_mailbox.py
@@ -681,11 +681,11 @@
box = self._factory(self._path, factory=dummy_factory)
folder = box.add_folder('folder1')
self.assert_(folder._factory is dummy_factory)
-
+
folder1_alias = box.get_folder('folder1')
self.assert_(folder1_alias._factory is dummy_factory)
-
+
class _TestMboxMMDF(TestMailbox):
@@ -767,15 +767,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):
@@ -805,7 +805,7 @@
def dummy_factory (s):
return None
self._box = self._factory(self._path, dummy_factory)
-
+
new_folder = self._box.add_folder('foo.bar')
folder0 = self._box.get_folder('foo.bar')
folder0.add(self._template % 'bar')
@@ -901,7 +901,7 @@
self.assert_(self._box.get_sequences() ==
{'foo':[1, 2, 3, 4, 5],
'unseen':[1], 'bar':[3], 'replied':[3]})
-
+
def _get_lock_path(self):
return os.path.join(self._path, '.mh_sequences.lock')
diff --git a/Lib/test/test_old_mailbox.py b/Lib/test/test_old_mailbox.py
index c8f6bac..7bd5557 100644
--- a/Lib/test/test_old_mailbox.py
+++ b/Lib/test/test_old_mailbox.py
@@ -116,7 +116,7 @@
def tearDown(self):
os.unlink(self._path)
-
+
def test_from_regex (self):
# Testing new regex from bug #1633678
f = open(self._path, 'w')
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index f15ce09..08f28f0 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -610,7 +610,7 @@
for typecode in 'cbBuhHiIlLfd':
a = array.array(typecode)
self.assertEqual(re.compile("bla").match(a), None)
- self.assertEqual(re.compile("").match(a).groups(), ())
+ self.assertEqual(re.compile("").match(a).groups(), ())
def run_re_tests():
from test.re_tests import benchmarks, tests, SUCCEED, FAIL, SYNTAX_ERROR
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index 2191f32..bb5e549 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -252,7 +252,7 @@
gen.endDocument()
return result.getvalue() == start+'<my:a xmlns:my="qux" b="c"></my:a>'
-
+
# ===== Xmlfilterbase
def test_filter_basic():
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index ef7cea7..872a467 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -288,7 +288,7 @@
self.assertEqual(sum(elem.hash_count for elem in d), n)
if hasattr(s, 'symmetric_difference_update'):
s.symmetric_difference_update(d)
- self.assertEqual(sum(elem.hash_count for elem in d), n)
+ self.assertEqual(sum(elem.hash_count for elem in d), n)
d2 = dict.fromkeys(set(d))
self.assertEqual(sum(elem.hash_count for elem in d), n)
d3 = dict.fromkeys(frozenset(d))
@@ -500,7 +500,7 @@
set.__init__(self, iterable)
class TestSetSubclassWithKeywordArgs(TestSet):
-
+
def test_keywords_in_subclass(self):
'SF bug #1486663 -- this used to erroneously raise a TypeError'
SetSubclassWithKeywordArgs(newarg=1)
@@ -1487,7 +1487,7 @@
test_classes = (
TestSet,
TestSetSubclass,
- TestSetSubclassWithKeywordArgs,
+ TestSetSubclassWithKeywordArgs,
TestFrozenSet,
TestFrozenSetSubclass,
TestSetOfSets,
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index ef8e9a2..ff97470 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -373,7 +373,7 @@
... elif 1:
... pass
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (<doctest test.test_syntax[44]>, line 2)
>>> if 1:
@@ -381,7 +381,7 @@
... elif 1:
... x() = 1
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (<doctest test.test_syntax[45]>, line 4)
>>> if 1:
@@ -391,7 +391,7 @@
... else:
... pass
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (<doctest test.test_syntax[46]>, line 2)
>>> if 1:
@@ -401,7 +401,7 @@
... else:
... pass
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (<doctest test.test_syntax[47]>, line 4)
>>> if 1:
@@ -411,7 +411,7 @@
... else:
... x() = 1
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (<doctest test.test_syntax[48]>, line 6)
"""