changeset 2005:181a556a0920

pep8 fixed for the tests
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 17 Feb 2013 04:01:18 +0100
parents 8c71a45e11f2
children 3f08275cd676
files MoinMoin/_tests/ldap_testbase.py MoinMoin/_tests/test_error.py MoinMoin/_tests/test_forms.py MoinMoin/_tests/test_test_environ.py MoinMoin/_tests/test_user.py MoinMoin/_tests/test_wikiutil.py MoinMoin/_tests/wikiconfig.py MoinMoin/apps/admin/_tests/test_admin.py MoinMoin/apps/feed/_tests/test_feed.py MoinMoin/apps/frontend/_tests/test_frontend.py MoinMoin/apps/misc/_tests/test_misc.py MoinMoin/apps/serve/_tests/test_serve.py MoinMoin/auth/_tests/test_auth.py MoinMoin/auth/_tests/test_ldap_login.py MoinMoin/config/_tests/test_defaultconfig.py MoinMoin/converter/_tests/test__args.py MoinMoin/converter/_tests/test__args_wiki.py MoinMoin/converter/_tests/test_docbook_in.py MoinMoin/converter/_tests/test_docbook_out.py MoinMoin/converter/_tests/test_html_in.py MoinMoin/converter/_tests/test_html_in_out.py MoinMoin/converter/_tests/test_html_out.py MoinMoin/converter/_tests/test_include.py MoinMoin/converter/_tests/test_link.py MoinMoin/converter/_tests/test_moinwiki19_in.py MoinMoin/converter/_tests/test_moinwiki_in.py MoinMoin/converter/_tests/test_moinwiki_in_out.py MoinMoin/converter/_tests/test_rst_in.py MoinMoin/converter/_tests/test_rst_out.py MoinMoin/datastruct/backends/_tests/test_config_dicts.py MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py MoinMoin/datastruct/backends/_tests/test_wiki_groups.py MoinMoin/i18n/_tests/test_i18n.py MoinMoin/items/_tests/test_Content.py MoinMoin/items/_tests/test_Item.py MoinMoin/macro/_tests/test_Anchor.py MoinMoin/macro/_tests/test_Date.py MoinMoin/macro/_tests/test_DateTime.py MoinMoin/macro/_tests/test_GetText.py MoinMoin/macro/_tests/test_GetVal.py MoinMoin/macro/_tests/test_Verbatim.py MoinMoin/macro/_tests/test__base.py MoinMoin/mail/_tests/test_sendmail.py MoinMoin/security/_tests/test_security.py MoinMoin/security/_tests/test_textcha.py MoinMoin/storage/backends/_tests/__init__.py MoinMoin/storage/backends/_tests/test_fileserver.py MoinMoin/storage/backends/_tests/test_stores.py MoinMoin/storage/middleware/_tests/test_indexing.py MoinMoin/storage/middleware/_tests/test_protecting.py MoinMoin/storage/middleware/_tests/test_routing.py MoinMoin/storage/middleware/_tests/test_serialization.py MoinMoin/storage/middleware/_tests/test_validation.py MoinMoin/storage/stores/_tests/test_all.py MoinMoin/storage/stores/_tests/test_kt.py MoinMoin/storage/stores/_tests/test_memory.py MoinMoin/storage/stores/_tests/test_mongodb.py MoinMoin/storage/stores/_tests/test_sqla.py MoinMoin/storage/stores/_tests/test_sqlite.py MoinMoin/themes/_tests/test_navi_bar.py MoinMoin/util/_tests/test_crypto.py MoinMoin/util/_tests/test_diff3.py MoinMoin/util/_tests/test_diff_html.py MoinMoin/util/_tests/test_diff_text.py MoinMoin/util/_tests/test_filesys.py MoinMoin/util/_tests/test_forms.py MoinMoin/util/_tests/test_interwiki.py MoinMoin/util/_tests/test_iri.py MoinMoin/util/_tests/test_mime.py MoinMoin/util/_tests/test_mimetype.py MoinMoin/util/_tests/test_paramparser.py MoinMoin/util/_tests/test_pysupport.py MoinMoin/util/_tests/test_registry.py MoinMoin/util/_tests/test_send_file.py MoinMoin/util/_tests/test_thread_monitor.py MoinMoin/util/_tests/test_tree.py MoinMoin/util/_tests/test_util.py MoinMoin/util/_tests/test_version.py _ui_tests/conftest.py
diffstat 79 files changed, 301 insertions(+), 107 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/ldap_testbase.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/_tests/ldap_testbase.py	Sun Feb 17 04:01:18 2013 +0100
@@ -50,7 +50,10 @@
 import hashlib
 
 try:
-    import ldap, ldif, ldap.modlist  # needs python-ldap
+    # needs python-ldap
+    import ldap
+    import ldap.modlist
+    import ldif
 except ImportError:
     ldap = None
 
--- a/MoinMoin/_tests/test_error.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/_tests/test_error.py	Sun Feb 17 04:01:18 2013 +0100
@@ -46,6 +46,7 @@
         err = error.Error(test)
         assert '%(message)s' % dict(message=err) == test
 
+
 class TestCompositeError(object):
 
     def setup_method(self, method):
@@ -72,4 +73,5 @@
         expected = ['This is a fatal Error']
         assert result == expected
 
+
 coverage_modules = ['MoinMoin.error']
--- a/MoinMoin/_tests/test_forms.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/_tests/test_forms.py	Sun Feb 17 04:01:18 2013 +0100
@@ -10,6 +10,7 @@
 
 from MoinMoin.forms import DateTimeUNIX
 
+
 def test_datetimeunix():
     dt = datetime.datetime(2012, 12, 21, 23, 45, 59)
     timestamp = timegm(dt.timetuple())
--- a/MoinMoin/_tests/test_test_environ.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/_tests/test_test_environ.py	Sun Feb 17 04:01:18 2013 +0100
@@ -14,6 +14,7 @@
 
 from MoinMoin._tests import wikiconfig
 
+
 class TestStorageEnvironWithoutConfig(object):
     def setup_method(self, method):
         self.class_level_value = 123
@@ -34,12 +35,13 @@
 
 
 CONTENT_ACL = dict(
-        before="+All:write", # need to write to sys pages
+        before="+All:write",  # need to write to sys pages
         default="All:read,write,admin,create,destroy",
         after="Me:create",
         hierarchic=False,
 )
 
+
 class TestStorageEnvironWithConfig(object):
 
     class Config(wikiconfig.Config):
--- a/MoinMoin/_tests/test_user.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/_tests/test_user.py	Sun Feb 17 04:01:18 2013 +0100
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 # Copyright: 2003-2004 by Juergen Hermann <jh@web.de>
 # Copyright: 2009 by ReimarBauer
-# Copyright: 2013 by ThomasWaldmann
+# Copyright: 2011-2013 by ThomasWaldmann
 # License: GNU GPL v2 (or any later version), see LICENSE.txt for details.
 
 """
@@ -67,7 +67,7 @@
     def testUnicodePassword(self):
         """ user: login with non-ascii password """
         # Create test user
-        name = u'__שם משתמש לא קיים__' # Hebrew
+        name = u'__שם משתמש לא קיים__'  # Hebrew
         password = name
         self.createUser(name, password)
 
@@ -87,7 +87,7 @@
         assert theUser.valid
 
         # invalidate the stored password (hash)
-        theUser.set_password("") # emptry str or None means "invalidate"
+        theUser.set_password("")  # emptry str or None means "invalidate"
         theUser.save()
 
         # Try to "login" with previous password
@@ -128,7 +128,7 @@
         # Login - this should replace the old password in the user file
         theUser = user.User(name=name, password=password)
         theUser.subscribe(pagename)
-        assert theUser.is_subscribed_to([pagename]) # list(!) of pages to check
+        assert theUser.is_subscribed_to([pagename])  # list(!) of pages to check
 
     def testSubscriptionSubPage(self):
         """ user: tests is_subscribed_to on a subpage """
@@ -140,7 +140,7 @@
         # Login - this should replace the old password in the user file
         theUser = user.User(name=name, password=password)
         theUser.subscribe(pagename)
-        assert not theUser.is_subscribed_to([testPagename]) # list(!) of pages to check
+        assert not theUser.is_subscribed_to([testPagename])  # list(!) of pages to check
 
     # Bookmarks -------------------------------------------------------
 
@@ -295,10 +295,10 @@
     def testValid(self):
         """ user: isValidName: accept names in any language, with spaces """
         cases = (
-            u'Jürgen Hermann', # German
-            u'ניר סופר', # Hebrew
-            u'CamelCase', # Good old camel case
-            u'가각간갇갈 갉갊감 갬갯걀갼' # Hangul (gibberish)
+            u'Jürgen Hermann',  # German
+            u'ניר סופר',  # Hebrew
+            u'CamelCase',  # Good old camel case
+            u'가각간갇갈 갉갊감 갬갯걀갼'  # Hangul (gibberish)
             )
         for test in cases:
             assert user.isValidName(test)
--- a/MoinMoin/_tests/test_wikiutil.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/_tests/test_wikiutil.py	Sun Feb 17 04:01:18 2013 +0100
@@ -1,5 +1,5 @@
 # Copyright: 2003-2004 by Juergen Hermann <jh@web.de>
-# Copyright: 2007 by MoinMoin:ThomasWaldmann
+# Copyright: 2007-2013 by MoinMoin:ThomasWaldmann
 # License: GNU GPL v2 (or any later version), see LICENSE.txt for details.
 
 """
@@ -19,10 +19,10 @@
 
 class TestCleanInput(object):
     def testCleanInput(self):
-        tests = [(u"", u""), # empty
-                 (u"aaa\r\n\tbbb", u"aaa   bbb"), # ws chars -> blanks
-                 (u"aaa\x00\x01bbb", u"aaabbb"), # strip weird chars
-                 (u"a"*500, u""), # too long
+        tests = [(u"", u""),  # empty
+                 (u"aaa\r\n\tbbb", u"aaa   bbb"),  # ws chars -> blanks
+                 (u"aaa\x00\x01bbb", u"aaabbb"),  # strip weird chars
+                 (u"a" * 500, u""),  # too long
                 ]
         for instr, outstr in tests:
             assert wikiutil.clean_input(instr) == outstr
@@ -56,13 +56,14 @@
         (('MainPage', '/SubPage1'), 'MainPage/SubPage1'),
         (('MainPage', '/SubPage1/SubPage2'), 'MainPage/SubPage1/SubPage2'),
         (('MainPage/SubPage1', '/SubPage2/SubPage3'), 'MainPage/SubPage1/SubPage2/SubPage3'),
-        (('', '/OtherMainPage'), 'OtherMainPage'), # strange
+        (('', '/OtherMainPage'), 'OtherMainPage'),  # strange
         # PARENT_PREFIX
         (('MainPage/SubPage', '../SisterPage'), 'MainPage/SisterPage'),
         (('MainPage/SubPage1/SubPage2', '../SisterPage'), 'MainPage/SubPage1/SisterPage'),
         (('MainPage/SubPage1/SubPage2', '../../SisterPage'), 'MainPage/SisterPage'),
-        (('MainPage', '../SisterPage'), 'SisterPage'), # strange
+        (('MainPage', '../SisterPage'), 'SisterPage'),  # strange
     ]
+
     def test_abs_pagename(self):
         for (current_page, relative_page), absolute_page in self.tests:
             yield self._check_abs_pagename, current_page, relative_page, absolute_page
@@ -135,6 +136,7 @@
             result = wikiutil.normalize_pagename(test, app.cfg)
             assert result == expected
 
+
 class TestGroupItems(object):
 
     def testNormalizeGroupName(self):
@@ -165,6 +167,7 @@
     expected = u'some/parent'
     assert result == expected
 
+
 def testdrawing2fname():
     # with extension not in DRAWING_EXTENSIONS
     result = wikiutil.drawing2fname('Moin_drawing.txt')
@@ -175,6 +178,7 @@
     expected = 'Moindir.Moin_drawing.jpg'
     assert result == expected
 
+
 def testgetUnicodeIndexGroup():
     result = wikiutil.getUnicodeIndexGroup(['moin-2', 'MoinMoin'])
     expected = 'MOIN-2'
@@ -183,6 +187,7 @@
     with pytest.raises(IndexError):
         result = wikiutil.getUnicodeIndexGroup('')
 
+
 def testis_URL():
     sample_schemes = ['http', 'https', 'ftp', 'ssh']
     for scheme in sample_schemes:
@@ -196,6 +201,7 @@
     result = wikiutil.is_URL('invalid_scheme:MoinMoin')
     assert not result
 
+
 def testcontainsConflictMarker():
     # text with conflict marker
     result = wikiutil.containsConflictMarker("/!\\ '''Edit conflict - Conflict marker is present")
@@ -205,6 +211,7 @@
     result = wikiutil.containsConflictMarker('No conflict marker')
     assert not result
 
+
 def testsplit_anchor():
     """
     TODO: add the test for for split_anchor when we have better
@@ -222,6 +229,7 @@
     expected = ['#MoinMoin', '']
     assert result == expected
 
+
 def testfile_headers():
     test_headers = [
                 #test_file, content_type
@@ -242,4 +250,5 @@
     expected = [('Content-Type', 'text/plain')]
     assert result == expected
 
+
 coverage_modules = ['MoinMoin.wikiutil']
--- a/MoinMoin/_tests/wikiconfig.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/_tests/wikiconfig.py	Sun Feb 17 04:01:18 2013 +0100
@@ -1,4 +1,5 @@
 # Copyright: 2000-2004 by Juergen Hermann <jh@web.de>
+# Copyright: 2011-2013 by MoinMoin:ThomasWaldmann
 # License: GNU GPL v2 (or any later version), see LICENSE.txt for details.
 
 """
@@ -13,10 +14,14 @@
 
 import os
 from os.path import abspath, dirname, join
+
 from MoinMoin.config.default import DefaultConfig
 
 
 class Config(DefaultConfig):
+    """
+    default configuration for the unit tests
+    """
     _here = abspath(dirname(__file__))
     _root = abspath(join(_here, '..', '..'))
     data_dir = join(_here, 'wiki', 'data')  # needed for plugins package TODO
--- a/MoinMoin/apps/admin/_tests/test_admin.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/apps/admin/_tests/test_admin.py	Sun Feb 17 04:01:18 2013 +0100
@@ -7,6 +7,7 @@
 
 from flask import url_for
 
+
 class TestAdmin(object):
     def _test_view_get(self, url, status='200 OK', data=('<html>', '</html>')):
         with self.app.test_client() as c:
--- a/MoinMoin/apps/feed/_tests/test_feed.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/apps/feed/_tests/test_feed.py	Sun Feb 17 04:01:18 2013 +0100
@@ -10,6 +10,7 @@
 from MoinMoin.constants.keys import COMMENT
 from MoinMoin._tests import update_item, wikiconfig
 
+
 class TestFeeds(object):
     class Config(wikiconfig.Config):
         """
--- a/MoinMoin/apps/frontend/_tests/test_frontend.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/apps/frontend/_tests/test_frontend.py	Sun Feb 17 04:01:18 2013 +0100
@@ -201,7 +201,7 @@
 
     def test_favicon(self):
         rv = self._test_view('frontend.favicon', content_types=['image/x-icon', 'image/vnd.microsoft.icon', ], data=[])
-        assert rv.data.startswith('\x00\x00') # "reserved word, should always be 0"
+        assert rv.data.startswith('\x00\x00')  # "reserved word, should always be 0"
 
     def test_global_tags(self):
         self._test_view('frontend.global_tags')
@@ -236,28 +236,28 @@
         flaskg.user = user.User(name=u'moin', password=u'Xiwejr622')
         form = self.fillPasswordChangeForm(u'Xiwejr622', u'Woodoo645', u'Woodoo645')
         valid = form.validate()
-        assert valid # form data is valid
+        assert valid  # form data is valid
 
     def test_user_unicode_password_change(self):
         name = u'moin'
-        password = u'__שם משתמש לא קיים__' # Hebrew
+        password = u'__שם משתמש לא קיים__'  # Hebrew
 
         self.createUser(name, password)
         flaskg.user = user.User(name=name, password=password)
         form = self.fillPasswordChangeForm(password, u'Woodoo645', u'Woodoo645')
         valid = form.validate()
-        assert valid # form data is valid
+        assert valid  # form data is valid
 
     def test_user_password_change_to_unicode_pw(self):
         name = u'moin'
         password = u'Xiwejr622'
-        new_password = u'__שם משתמש לא קיים__' # Hebrew
+        new_password = u'__שם משתמש לא קיים__'  # Hebrew
 
         self.createUser(name, password)
         flaskg.user = user.User(name=name, password=password)
         form = self.fillPasswordChangeForm(password, new_password, new_password)
         valid = form.validate()
-        assert valid # form data is valid
+        assert valid  # form data is valid
 
     def test_fail_user_password_change_pw_mismatch(self):
         self.createUser(u'moin', u'Xiwejr622')
--- a/MoinMoin/apps/misc/_tests/test_misc.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/apps/misc/_tests/test_misc.py	Sun Feb 17 04:01:18 2013 +0100
@@ -9,6 +9,7 @@
 
 from MoinMoin._tests import wikiconfig
 
+
 class TestMisc(object):
     class Config(wikiconfig.Config):
         """
--- a/MoinMoin/apps/serve/_tests/test_serve.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/apps/serve/_tests/test_serve.py	Sun Feb 17 04:01:18 2013 +0100
@@ -7,6 +7,7 @@
 
 from flask import url_for
 
+
 class TestServe(object):
     def test_index(self):
         with self.app.test_client() as c:
--- a/MoinMoin/auth/_tests/test_auth.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/auth/_tests/test_auth.py	Sun Feb 17 04:01:18 2013 +0100
@@ -12,6 +12,7 @@
 from MoinMoin.auth import GivenAuth, handle_login, get_multistage_continuation_url
 from MoinMoin.user import create_user
 
+
 class TestConfiguredGivenAuth(object):
     """ Test: configured GivenAuth """
     class Config(wikiconfig.Config):
@@ -52,6 +53,7 @@
         assert test_user.valid
         assert test_user.name == [u'Test_User', ]
 
+
 def test_handle_login():
     # no messages in the beginning
     assert not flaskg._login_messages
@@ -73,8 +75,10 @@
     assert test_user2.name == [u'Test_User', ]
     assert test_user2.valid
 
+
 def test_get_multistage_continuation_url():
-    test_url = get_multistage_continuation_url('test_auth_name', extra_fields={'password': 'test_pass', 'test_key': 'test_value'})
+    test_url = get_multistage_continuation_url('test_auth_name',
+                                               extra_fields={'password': 'test_pass', 'test_key': 'test_value'})
     assert 'test_key=test_value' in test_url
     assert 'password=test_pass' in test_url
     assert 'stage=test_auth_name' in test_url
--- a/MoinMoin/auth/_tests/test_ldap_login.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/auth/_tests/test_ldap_login.py	Sun Feb 17 04:01:18 2013 +0100
@@ -23,6 +23,7 @@
 
 import ldap
 
+
 class TestLDAPServer(LDAPTstBase):
     basedn = BASEDN
     rootdn = ROOTDN
@@ -35,13 +36,14 @@
         server_uri = self.ldap_env.slapd.url
         base_dn = self.ldap_env.basedn
         lo = ldap.initialize(server_uri)
-        ldap.set_option(ldap.OPT_PROTOCOL_VERSION, ldap.VERSION3) # ldap v2 is outdated
+        ldap.set_option(ldap.OPT_PROTOCOL_VERSION, ldap.VERSION3)  # ldap v2 is outdated
         lo.simple_bind_s('', '')
         lusers = lo.search_st(base_dn, ldap.SCOPE_SUBTREE, '(uid=*)')
         uids = [ldap_dict['uid'][0] for dn, ldap_dict in lusers]
         assert 'usera' in uids
         assert 'userb' in uids
 
+
 class TestMoinLDAPLogin(LDAPTstBase):
     basedn = BASEDN
     rootdn = ROOTDN
@@ -132,6 +134,7 @@
         u2 = handle_login(None, username='usera', password='wrong')
         assert u2 is None
 
+
 class TestTwoLdapServers(object):
     basedn = BASEDN
     rootdn = ROOTDN
@@ -164,7 +167,7 @@
             server_uri = ldap_env.slapd.url
             base_dn = ldap_env.basedn
             lo = ldap.initialize(server_uri)
-            ldap.set_option(ldap.OPT_PROTOCOL_VERSION, ldap.VERSION3) # ldap v2 is outdated
+            ldap.set_option(ldap.OPT_PROTOCOL_VERSION, ldap.VERSION3)  # ldap v2 is outdated
             lo.simple_bind_s('', '')
             lusers = lo.search_st(base_dn, ldap.SCOPE_SUBTREE, '(uid=*)')
             uids = [ldap_dict['uid'][0] for dn, ldap_dict in lusers]
@@ -214,7 +217,7 @@
             try:
                 ldap_env.stop_slapd()
             except:
-                pass # one will fail, because it is already stopped
+                pass  # one will fail, because it is already stopped
             ldap_env.destroy_env()
 
     def testMoinLDAPFailOver(self):
--- a/MoinMoin/config/_tests/test_defaultconfig.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/config/_tests/test_defaultconfig.py	Sun Feb 17 04:01:18 2013 +0100
@@ -10,22 +10,24 @@
 
 from flask import current_app as app
 
+
 class TestPasswordChecker(object):
     username = u"SomeUser"
     tests_builtin = [
-        (u'', False), # empty
-        (u'1966', False), # too short
-        (u'asdfghjk', False), # keyboard sequence
-        (u'QwertZuiop', False), # german keyboard sequence, with uppercase
-        (u'mnbvcx', False), # reverse keyboard sequence
-        (u'12345678', False), # keyboard sequence, too easy
-        (u'aaaaaaaa', False), # not enough different chars
-        (u'BBBaaaddd', False), # not enough different chars
-        (username, False), # username == password
-        (username[1:-1], False), # password in username
-        (u"XXX{0}XXX".format(username), False), # username in password
-        (u'Moin-2007', True), # this should be OK
+        (u'', False),  # empty
+        (u'1966', False),  # too short
+        (u'asdfghjk', False),  # keyboard sequence
+        (u'QwertZuiop', False),  # german keyboard sequence, with uppercase
+        (u'mnbvcx', False),  # reverse keyboard sequence
+        (u'12345678', False),  # keyboard sequence, too easy
+        (u'aaaaaaaa', False),  # not enough different chars
+        (u'BBBaaaddd', False),  # not enough different chars
+        (username, False),  # username == password
+        (username[1:-1], False),  # password in username
+        (u"XXX{0}XXX".format(username), False),  # username in password
+        (u'Moin-2007', True),  # this should be OK
     ]
+
     def testBuiltinPasswordChecker(self):
         pw_checker = app.cfg.password_checker
         if not pw_checker:
@@ -36,4 +38,5 @@
                 print "{0!r}: {1}".format(pw, pw_error)
                 assert result == (pw_error is None)
 
+
 coverage_modules = ['MoinMoin.config.default']
--- a/MoinMoin/converter/_tests/test__args.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test__args.py	Sun Feb 17 04:01:18 2013 +0100
@@ -10,6 +10,7 @@
 
 from MoinMoin.converter._args import *
 
+
 def test_Arguments___init__():
     positional = []
     keyword = {}
@@ -21,6 +22,7 @@
     assert keyword == a.keyword
     assert keyword is not a.keyword
 
+
 def test_Arguments___contains__():
     positional = ['positional', 'both']
     keyword = {'keyword': None, 'both': None}
@@ -32,6 +34,7 @@
     assert 'both' in a
     assert 'none' not in a
 
+
 def test_Arguments___getitem__():
     positional = ['positional', 'both']
     keyword = {'keyword': None, 'both': None}
@@ -47,6 +50,7 @@
     pytest.raises(IndexError, a.__getitem__, 2)
     pytest.raises(KeyError, a.__getitem__, 'none')
 
+
 def test_Arguments___len__():
     positional = ['positional', 'both']
     keyword = {'keyword': None, 'both': None}
@@ -55,6 +59,7 @@
 
     assert len(a) == 4
 
+
 def test_Arguments_items():
     positional = ['positional', 'both']
     keyword = {'keyword': True, 'both': False}
@@ -69,6 +74,7 @@
     assert ('keyword', True) in l
     assert ('both', False) in l
 
+
 def test_Arguments_keys():
     positional = ['positional', 'both']
     keyword = {'keyword': True, 'both': False}
@@ -81,6 +87,7 @@
     assert 'keyword' in l
     assert 'both' in l
 
+
 def test_Arguments_values():
     positional = ['positional', 'both']
     keyword = {'keyword': True, 'both': False}
--- a/MoinMoin/converter/_tests/test__args_wiki.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test__args_wiki.py	Sun Feb 17 04:01:18 2013 +0100
@@ -8,6 +8,7 @@
 
 from MoinMoin.converter._args_wiki import *
 
+
 def test():
     yield (do,
         ur'both positional both=foo keyword=bar',
@@ -24,11 +25,13 @@
         [u'a b\tc\nd'],
         {u'k': u'a b\tc\nd'})
 
+
 def test_parse():
     a = parse(ur''''a b\tc\nd',k="a b\tc\nd"''')
     assert a.positional == [u'a b\tc\nd']
     assert a.keyword == {u'k': u'a b\tc\nd'}
 
+
 def do(wiki, positional, keyword):
     a = parse(wiki)
     assert a.positional == positional
--- a/MoinMoin/converter/_tests/test_docbook_in.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_docbook_in.py	Sun Feb 17 04:01:18 2013 +0100
@@ -24,6 +24,7 @@
 
 from MoinMoin.converter.docbook_in import *
 
+
 class Base(object):
     input_namespaces = ns_all = u'xmlns="{0}" xmlns:xlink="{1}"'.format(docbook.namespace, xlink.namespace)
     output_namespaces = {
@@ -66,6 +67,7 @@
         tree = etree.parse(StringIO.StringIO(string_to_parse))
         assert (tree.xpath(xpath_query, namespaces=self.namespaces_xpath))
 
+
 class TestConverter(Base):
     def setup_class(self):
         self.conv = Converter()
--- a/MoinMoin/converter/_tests/test_docbook_out.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_docbook_out.py	Sun Feb 17 04:01:18 2013 +0100
@@ -23,6 +23,7 @@
 
 from MoinMoin.converter.docbook_out import *
 
+
 class Base(object):
     input_namespaces = ns_all = 'xmlns="{0}" xmlns:page="{1}" xmlns:html="{2}" xmlns:xlink="{3}" xmlns:xml="{4}"'.format(moin_page.namespace, moin_page.namespace, html.namespace, xlink.namespace, xml.namespace)
     output_namespaces = {
@@ -56,6 +57,7 @@
         tree = etree.parse(StringIO.StringIO(string_to_parse))
         assert (tree.xpath(xpath, namespaces=self.namespaces_xpath))
 
+
 class TestConverter(Base):
     def setup_class(self):
         self.conv = Converter()
--- a/MoinMoin/converter/_tests/test_html_in.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_html_in.py	Sun Feb 17 04:01:18 2013 +0100
@@ -21,6 +21,7 @@
 logging = log.getLogger(__name__)
 from MoinMoin.converter.html_in import *
 
+
 class Base(object):
     namespaces = {
         moin_page.namespace: '',
@@ -49,6 +50,7 @@
         tree = etree.parse(StringIO.StringIO(string_to_parse))
         assert (tree.xpath(path, namespaces=self.namespaces_xpath))
 
+
 class TestConverter(Base):
     def setup_class(self):
         self.conv = Converter()
--- a/MoinMoin/converter/_tests/test_html_in_out.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_html_in_out.py	Sun Feb 17 04:01:18 2013 +0100
@@ -25,6 +25,7 @@
 from MoinMoin.converter.html_out import Converter as HTML_OUT
 from MoinMoin.util.tree import html, moin_page, xlink
 
+
 class Base(object):
 
     namespaces = {
@@ -51,6 +52,7 @@
         tree = etree.parse(StringIO.StringIO(string_to_parse))
         assert (tree.xpath(path))
 
+
 class TestConverter(Base):
     def setup_class(self):
         self.conv_html_dom = HTML_IN()
--- a/MoinMoin/converter/_tests/test_html_out.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_html_out.py	Sun Feb 17 04:01:18 2013 +0100
@@ -23,6 +23,7 @@
 
 from MoinMoin.converter.html_out import *
 
+
 class Base(object):
     input_namespaces = ns_all = 'xmlns="{0}" xmlns:page="{1}" xmlns:html="{2}" xmlns:xlink="{3}" xmlns:xml="{4}"'.format(moin_page.namespace, moin_page.namespace, html.namespace, xlink.namespace, xml.namespace)
     output_namespaces = {
@@ -51,6 +52,7 @@
         tree = etree.parse(StringIO.StringIO(string_to_parse))
         assert (tree.xpath(xpath))
 
+
 class TestConverter(Base):
     def setup_class(self):
         self.conv = Converter()
@@ -229,6 +231,7 @@
         for i in data:
             yield (self.do, ) + i
 
+
 class TestConverterPage(Base):
     def setup_class(self):
         self.conv = ConverterPage()
--- a/MoinMoin/converter/_tests/test_include.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_include.py	Sun Feb 17 04:01:18 2013 +0100
@@ -11,6 +11,7 @@
 from MoinMoin.constants.keys import CONTENTTYPE
 from MoinMoin._tests import wikiconfig, update_item
 
+
 class TestInclude(object):
     class Config(wikiconfig.Config):
         """
@@ -131,12 +132,14 @@
         update_item(u'page2', {CONTENTTYPE: u'text/x.moin.wiki'}, u"")
         rendered = Item.create(u'page1').content._render_data()
         assert '<p>text <span class="moin-transclusion" data-href="/page2"></span> text</p>' in rendered
+
     def test_InlineIncludeCreole(self):
         # transclude single paragraph as inline using creole parser
         update_item(u'creole', {CONTENTTYPE: u'text/x.moin.creole;charset=utf-8'}, u'creole item')
         update_item(u'page1', {CONTENTTYPE: u'text/x.moin.creole;charset=utf-8'}, u'before {{creole}} after')
         rendered = Item.create(u'page1').content._render_data()
         assert '<p>before <span class="moin-transclusion" data-href="/creole">creole item</span> after</p>' in rendered
+
     def test_InlineIncludeWithinMarkup(self):
         # transclude single line item within italic and bold markup
         update_item(u'page1', {CONTENTTYPE: u'text/x.moin.wiki'}, u"Normal ''italic '''bold {{page2}} bold''' italic'' normal")
--- a/MoinMoin/converter/_tests/test_link.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_link.py	Sun Feb 17 04:01:18 2013 +0100
@@ -15,6 +15,7 @@
 from MoinMoin.converter.link import *
 from MoinMoin.util.iri import Iri
 
+
 class TestConverterExternOutput(object):
     def setup_class(self):
         self.conv = ConverterExternOutput()
--- a/MoinMoin/converter/_tests/test_moinwiki19_in.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_moinwiki19_in.py	Sun Feb 17 04:01:18 2013 +0100
@@ -32,7 +32,7 @@
                 '<page><body><p><a xlink:href="mailto:foo@bar.baz">mailto:foo@bar.baz</a></p></body></page>'),
             (u'foo@bar.baz',
                 '<page><body><p><a xlink:href="mailto:foo@bar.baz">foo@bar.baz</a></p></body></page>'),
-            (u'foo@bar', # 1.9 requires domain
+            (u'foo@bar',  # 1.9 requires domain
                 '<page><body><p>foo@bar</p></body></page>'),
         ]
         for i in data:
--- a/MoinMoin/converter/_tests/test_moinwiki_in.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_moinwiki_in.py	Sun Feb 17 04:01:18 2013 +0100
@@ -91,7 +91,7 @@
 
     def test_heading(self):
         data = [
-            (u'=Not_a_Heading=', # this is for better moin 1.x compatibility
+            (u'=Not_a_Heading=',  # this is for better moin 1.x compatibility
                 '<page><body><p>=Not_a_Heading=</p></body></page>'),
             (u'= Heading 1 =',
                 '<page><body><h outline-level="1">Heading 1</h></body></page>'),
@@ -284,6 +284,7 @@
         ]
         for i in data:
             yield (self.do, ) + i
+
     def test_interwiki(self):
         data = [
             (u'[[MoinMoin:RecentChanges]]',
@@ -308,7 +309,7 @@
                 '<page><body><p><a xlink:href="mailto:foo@bar.baz">mailto:foo@bar.baz</a></p></body></page>'),
             (u'[[mailto:foo@bar.baz|write me]]',
                 '<page><body><p><a xlink:href="mailto:foo@bar.baz">write me</a></p></body></page>'),
-            (u'[[mailto:foo.bar_baz@bar.baz]]', # . and _ are special characters commonly allowed by email systems
+            (u'[[mailto:foo.bar_baz@bar.baz]]',  # . and _ are special characters commonly allowed by email systems
                 '<page><body><p><a xlink:href="mailto:foo.bar_baz@bar.baz">mailto:foo.bar_baz@bar.baz</a></p></body></page>'),
         ]
         for i in data:
--- a/MoinMoin/converter/_tests/test_moinwiki_in_out.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_moinwiki_in_out.py	Sun Feb 17 04:01:18 2013 +0100
@@ -128,7 +128,7 @@
             yield (self.do, ) + i
 
     def test_page(self):
-        pytest.skip("please help fixing moin wiki round trip tests") # XXX TODO
+        pytest.skip("please help fixing moin wiki round trip tests")  # XXX TODO
         data = [
             (u"""
 This page aims to introduce the most important elements of MoinMoin``'s syntax at a glance, showing first the markup verbatim and then how it is rendered by the wiki engine. Additionally, you'll find links to the relative help pages. Please note that some of the features depend on your configuration.
--- a/MoinMoin/converter/_tests/test_rst_in.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_rst_in.py	Sun Feb 17 04:01:18 2013 +0100
@@ -153,4 +153,5 @@
         out = self.conv(input, 'text/x-rst;charset=utf-8', **args)
         assert self.serialize(out) == output
 
+
 coverage_modules = ['MoinMoin.converter.rst_in']
--- a/MoinMoin/converter/_tests/test_rst_out.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/converter/_tests/test_rst_out.py	Sun Feb 17 04:01:18 2013 +0100
@@ -179,4 +179,5 @@
         for i in data:
             yield (self.do, ) + i
 
+
 coverage_modules = ['MoinMoin.converter.rst_out']
--- a/MoinMoin/datastruct/backends/_tests/test_config_dicts.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/datastruct/backends/_tests/test_config_dicts.py	Sun Feb 17 04:01:18 2013 +0100
@@ -26,4 +26,5 @@
         for result in test_keyiterator:
             assert result in expected
 
+
 coverage_modules = ['MoinMoin.datastruct.backends.config_dicts']
--- a/MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py	Sun Feb 17 04:01:18 2013 +0100
@@ -13,6 +13,7 @@
 from MoinMoin.datastruct.backends import wiki_dicts
 from MoinMoin.constants.keys import SOMEDICT
 from MoinMoin._tests import become_trusted, update_item
+
 DATA = "This is a dict item."
 
 
@@ -40,4 +41,5 @@
         expected = {u'Two': u'2', u'One': u'1'}
         assert result == expected
 
+
 coverage_modules = ['MoinMoin.datastruct.backends.wiki_dicts']
--- a/MoinMoin/datastruct/backends/_tests/test_wiki_groups.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/datastruct/backends/_tests/test_wiki_groups.py	Sun Feb 17 04:01:18 2013 +0100
@@ -106,4 +106,5 @@
         assert not has_rights_before, 'AnotherUser has no read rights because in the beginning he is not a member of a group item NewGroup'
         assert has_rights_after, 'AnotherUser must have read rights because after appenditem he is member of NewGroup'
 
+
 coverage_modules = ['MoinMoin.datastruct.backends.wiki_groups']
--- a/MoinMoin/i18n/_tests/test_i18n.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/i18n/_tests/test_i18n.py	Sun Feb 17 04:01:18 2013 +0100
@@ -9,6 +9,7 @@
 
 from MoinMoin.i18n import _, L_, N_
 
+
 def test_user_attributes():
     test_locale = get_locale()
     assert test_locale == 'en'
@@ -16,6 +17,7 @@
     test_timezone = get_timezone()
     assert test_timezone == 'UTC'
 
+
 def test_text():
     # test for gettext
     result = _('test_text')
--- a/MoinMoin/items/_tests/test_Content.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/items/_tests/test_Content.py	Sun Feb 17 04:01:18 2013 +0100
@@ -64,6 +64,7 @@
         result2 = item1.content.get_templates(contenttype2)
         assert result2 == [item_name3]
 
+
 class TestTarItems(object):
     """
     tests for the container items
@@ -103,6 +104,7 @@
         item = Item.create(item_name, contenttype=u'application/x-tar')
         assert item.content.get_member('example1.txt').read() == filecontent
 
+
 class TestZipMixin(object):
     """ Test for zip-like items """
 
@@ -115,6 +117,7 @@
         with pytest.raises(NotImplementedError):
             item.content.put_member('example1.txt', filecontent, content_length, expected_members=members)
 
+
 class TestTransformableBitmapImage(object):
 
     def test__transform(self):
@@ -171,6 +174,7 @@
         except ImportError:
             pass
 
+
 class TestText(object):
 
     def test_data_conversion(self):
@@ -254,4 +258,5 @@
         assert u'<pre class="highlight">test_data\n' in result
         assert item2.content.data == ''
 
+
 coverage_modules = ['MoinMoin.items.content']
--- a/MoinMoin/items/_tests/test_Item.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/items/_tests/test_Item.py	Sun Feb 17 04:01:18 2013 +0100
@@ -24,6 +24,7 @@
     return [(IndexEntry(relname, Item.create('/'.join((basename, relname))).meta))
             for relname in relnames]
 
+
 def build_mixed_index(basename, spec):
     """
     Build a list of MixedIndexEntry by hand, useful as a test helper.
@@ -353,4 +354,5 @@
         assert item.meta['another_test_key'] == another_meta['another_test_key']
         assert item.content.data == another_data
 
+
 coverage_modules = ['MoinMoin.items']
--- a/MoinMoin/macro/_tests/test_Anchor.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/macro/_tests/test_Anchor.py	Sun Feb 17 04:01:18 2013 +0100
@@ -6,8 +6,10 @@
 """
 
 import pytest
+
 from MoinMoin.macro.Anchor import *
 
+
 def test_Macro():
     macro_obj = Macro()
     with pytest.raises(ValueError):
--- a/MoinMoin/macro/_tests/test_Date.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/macro/_tests/test_Date.py	Sun Feb 17 04:01:18 2013 +0100
@@ -8,10 +8,11 @@
 import time
 from datetime import datetime
 
+import pytest
 from flask.ext.babel import format_date, format_datetime
 
 from MoinMoin.macro.Date import MacroDateTimeBase, Macro
-import pytest
+
 
 class TestMacroDateTimeBase(object):
     def test_parse_time(self):
@@ -27,6 +28,7 @@
             # things after next 10,000 years can't be predicted
             MacroDateTimeBase_obj.parse_time('12011-08-07T11:11:11')
 
+
 class TestMacro(object):
     def test_macro(self):
         macro_obj = Macro()
--- a/MoinMoin/macro/_tests/test_DateTime.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/macro/_tests/test_DateTime.py	Sun Feb 17 04:01:18 2013 +0100
@@ -8,8 +8,10 @@
 import time
 from datetime import datetime
 
+import pytest
+
 from MoinMoin.macro.DateTime import *
-import pytest
+
 
 def test_Macro():
     """Test: DateTime.Macro """
--- a/MoinMoin/macro/_tests/test_GetText.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/macro/_tests/test_GetText.py	Sun Feb 17 04:01:18 2013 +0100
@@ -8,6 +8,7 @@
 from MoinMoin.converter._args import Arguments
 from MoinMoin.macro.GetText import *
 
+
 def test_Macro():
     """ test for Macro.macro """
     macro_obj = Macro()
--- a/MoinMoin/macro/_tests/test_GetVal.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/macro/_tests/test_GetVal.py	Sun Feb 17 04:01:18 2013 +0100
@@ -5,6 +5,7 @@
 Test for macro.GetVal
 """
 
+import pytest
 from flask import g as flaskg
 
 from MoinMoin.macro.GetVal import *
@@ -12,9 +13,10 @@
 from MoinMoin._tests import become_trusted, update_item
 from MoinMoin.conftest import init_test_app, deinit_test_app
 from MoinMoin._tests import wikiconfig
-import pytest
+
 DATA = "This is a dict item."
 
+
 class TestMacro(object):
     """ Test: GetVal.Macro """
 
--- a/MoinMoin/macro/_tests/test_Verbatim.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/macro/_tests/test_Verbatim.py	Sun Feb 17 04:01:18 2013 +0100
@@ -7,6 +7,7 @@
 
 from MoinMoin.macro.Verbatim import *
 
+
 def test_Macro():
     macro_obj = Macro()
     result = macro_obj.macro(u'test_text')
--- a/MoinMoin/macro/_tests/test__base.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/macro/_tests/test__base.py	Sun Feb 17 04:01:18 2013 +0100
@@ -8,6 +8,7 @@
 import pytest
 from MoinMoin.macro._base import *
 
+
 class TestMacroBase(object):
     """ Test for Macro base and related classes """
 
--- a/MoinMoin/mail/_tests/test_sendmail.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/mail/_tests/test_sendmail.py	Sun Feb 17 04:01:18 2013 +0100
@@ -9,6 +9,7 @@
 
 from email.Charset import Charset, QP
 from email.Header import Header
+
 from MoinMoin.mail import sendmail
 from MoinMoin.constants.contenttypes import CHARSET
 
@@ -41,6 +42,7 @@
         for coded, expected in self._tests:
             assert sendmail.decodeSpamSafeEmail(coded) == expected
 
+
 class TestencodeSpamSafeEmail(object):
     """mail.sendmail: testing spam safe mail"""
 
@@ -67,6 +69,7 @@
             expected = expected.replace(' AT ', ' AT SYCTE ')
             assert sendmail.encodeSpamSafeEmail(coded, 'SYCTE') == expected
 
+
 class TestEncodeAddress(object):
     """ Address encoding tests
 
@@ -127,4 +130,5 @@
         expected = str(address)
         assert sendmail.encodeAddress(address, self.charset) == expected
 
+
 coverage_modules = ['MoinMoin.mail.sendmail']
--- a/MoinMoin/security/_tests/test_security.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/security/_tests/test_security.py	Sun Feb 17 04:01:18 2013 +0100
@@ -267,6 +267,7 @@
 class TestGroupACL(object):
 
     from MoinMoin._tests import wikiconfig
+
     class Config(wikiconfig.Config):
         def groups(cfg):
             groups = {
@@ -276,7 +277,7 @@
                 # the group NAME, but not in the group members. This makes
                 # sure that a bug that erroneously checked "in groupname" (instead
                 # of "in groupmembers") does not reappear.
-                u'AllGroup': frozenset([]), # note: intended misnomer
+                u'AllGroup': frozenset([]),  # note: intended misnomer
             }
             return ConfigGroups(groups)
 
@@ -333,6 +334,7 @@
     ]
 
     from MoinMoin._tests import wikiconfig
+
     class Config(wikiconfig.Config):
         content_acl = dict(hierarchic=False, before=u"WikiAdmin:admin,read,write,create,destroy", default=u"All:read,write", after=u"All:read")
         acl_functions = u"SuperUser:superuser NoTextchaUser:notextcha"
@@ -350,17 +352,17 @@
         tests = [
             # itemname, username, expected_rights
             (self.mainitem_name, u'WikiAdmin', ['read', 'write', 'admin', 'create', 'destroy']),
-            (self.mainitem_name, u'AnyUser', ['read']), # by after acl
-            (self.mainitem_name, u'JaneDoe', ['read', 'write']), # by item acl
-            (self.mainitem_name, u'JoeDoe', []), # by item acl
+            (self.mainitem_name, u'AnyUser', ['read']),  # by after acl
+            (self.mainitem_name, u'JaneDoe', ['read', 'write']),  # by item acl
+            (self.mainitem_name, u'JoeDoe', []),  # by item acl
             (self.subitem1_name, u'WikiAdmin', ['read', 'write', 'admin', 'create', 'destroy']),
-            (self.subitem1_name, u'AnyUser', ['read', 'write']), # by default acl
-            (self.subitem1_name, u'JoeDoe', ['read', 'write']), # by default acl
-            (self.subitem1_name, u'JaneDoe', ['read', 'write']), # by default acl
+            (self.subitem1_name, u'AnyUser', ['read', 'write']),  # by default acl
+            (self.subitem1_name, u'JoeDoe', ['read', 'write']),  # by default acl
+            (self.subitem1_name, u'JaneDoe', ['read', 'write']),  # by default acl
             (self.subitem2_name, u'WikiAdmin', ['read', 'write', 'admin', 'create', 'destroy']),
-            (self.subitem2_name, u'AnyUser', ['read']), # by after acl
-            (self.subitem2_name, u'JoeDoe', ['read']), # by after acl
-            (self.subitem2_name, u'JaneDoe', ['read']), # by after acl
+            (self.subitem2_name, u'AnyUser', ['read']),  # by after acl
+            (self.subitem2_name, u'JoeDoe', ['read']),  # by after acl
+            (self.subitem2_name, u'JaneDoe', ['read']),  # by after acl
         ]
 
         for itemname, username, may in tests:
@@ -394,6 +396,7 @@
         assert not u.may.superuser()
         assert not u.may.notextcha()
 
+
 class TestItemHierachicalAcls(object):
     """ security: real-life access control list on items testing
     """
@@ -418,6 +421,7 @@
     ]
 
     from MoinMoin._tests import wikiconfig
+
     class Config(wikiconfig.Config):
         content_acl = dict(hierarchic=True, before=u"WikiAdmin:admin,read,write,create,destroy", default=u"All:read,write", after=u"All:read")
 
@@ -434,19 +438,19 @@
         tests = [
             # itemname, username, expected_rights
             (self.mainitem_name, u'WikiAdmin', ['read', 'write', 'admin', 'create', 'destroy']),
-            (self.mainitem_name, u'AnyUser', ['read']), # by after acl
-            (self.mainitem_name, u'JaneDoe', ['read', 'write']), # by item acl
-            (self.mainitem_name, u'JoeDoe', []), # by item acl
+            (self.mainitem_name, u'AnyUser', ['read']),  # by after acl
+            (self.mainitem_name, u'JaneDoe', ['read', 'write']),  # by item acl
+            (self.mainitem_name, u'JoeDoe', []),  # by item acl
             (self.subitem1_name, u'WikiAdmin', ['read', 'write', 'admin', 'create', 'destroy']),
-            (self.subitem1_name, u'AnyUser', ['read']), # by after acl
-            (self.subitem1_name, u'JoeDoe', []), # by inherited acl from main item
-            (self.subitem1_name, u'JaneDoe', ['read', 'write']), # by inherited acl from main item
+            (self.subitem1_name, u'AnyUser', ['read']),  # by after acl
+            (self.subitem1_name, u'JoeDoe', []),  # by inherited acl from main item
+            (self.subitem1_name, u'JaneDoe', ['read', 'write']),  # by inherited acl from main item
             (self.subitem2_name, u'WikiAdmin', ['read', 'write', 'admin', 'create', 'destroy']),
-            (self.subitem2_name, u'AnyUser', ['read']), # by after acl
-            (self.subitem2_name, u'JoeDoe', ['read']), # by after acl
-            (self.subitem2_name, u'JaneDoe', ['read']), # by after acl
-            (self.subitem_4boss, u'AnyUser', ['read']), # by after acl
-            (self.subitem_4boss, u'JoeDoe', ['read', 'write']), # by item acl
+            (self.subitem2_name, u'AnyUser', ['read']),  # by after acl
+            (self.subitem2_name, u'JoeDoe', ['read']),  # by after acl
+            (self.subitem2_name, u'JaneDoe', ['read']),  # by after acl
+            (self.subitem_4boss, u'AnyUser', ['read']),  # by after acl
+            (self.subitem_4boss, u'JoeDoe', ['read', 'write']),  # by item acl
         ]
 
         for itemname, username, may in tests:
--- a/MoinMoin/security/_tests/test_textcha.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/security/_tests/test_textcha.py	Sun Feb 17 04:01:18 2013 +0100
@@ -85,6 +85,7 @@
         assert textcha_obj.form['textcha_question'].optional
         assert textcha_obj.form['textcha'].optional
 
+
 class TestTextChaValid(object):
     """ Test: class TextChaValid """
     def setup_method(self, method):
--- a/MoinMoin/storage/backends/_tests/__init__.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/backends/_tests/__init__.py	Sun Feb 17 04:01:18 2013 +0100
@@ -14,6 +14,7 @@
 
 from MoinMoin.constants.keys import SIZE, HASH_ALGORITHM
 
+
 class BackendTestBase(object):
     def setup_method(self, method):
         """
@@ -111,7 +112,7 @@
             metaid = self.be.store(meta, StringIO(data))
 
     def test_iter(self):
-        mds = [# (metadata items, data str)
+        mds = [  # (metadata items, data str)
                 (dict(name='one'), 'ONE'),
                 (dict(name='two'), 'TWO'),
                 (dict(name='three'), 'THREE'),
--- a/MoinMoin/storage/backends/_tests/test_fileserver.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/backends/_tests/test_fileserver.py	Sun Feb 17 04:01:18 2013 +0100
@@ -51,7 +51,7 @@
     def test_files(self):
         # note: as we can only store the data into the file system, meta can
         # only have items that are generated by the fileserver backend:
-        items = [# name,  meta,   data
+        items = [  # name,  meta,   data
                  (u'foo.png', dict(size=11, contenttype=u'image/png'), 'png content'),
                  (u'bar.txt', dict(size=12, contenttype=u'text/plain'), 'text content'),
                 ]
@@ -80,7 +80,7 @@
     def test_dir(self):
         # note: as we can only store the data into the file system, meta can
         # only have items that are generated by the fileserver backend:
-        items = [# name,  meta,   data
+        items = [  # name,  meta,   data
                  (u'dir/foo.png', dict(size=11, contenttype=u'image/png'), 'png content'),
                  (u'dir/bar.txt', dict(size=12, contenttype=u'text/plain'), 'text content'),
                 ]
--- a/MoinMoin/storage/backends/_tests/test_stores.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/backends/_tests/test_stores.py	Sun Feb 17 04:01:18 2013 +0100
@@ -17,6 +17,7 @@
 from MoinMoin.storage.stores.memory import BytesStore as MemoryBytesStore
 from MoinMoin.storage.stores.memory import FileStore as MemoryFileStore
 
+
 class TestMemoryBackend(MutableBackendTestBase):
     def setup_method(self, method):
         meta_store = MemoryBytesStore()
@@ -31,6 +32,7 @@
 from MoinMoin.storage.stores.fs import BytesStore as FSBytesStore
 from MoinMoin.storage.stores.fs import FileStore as FSFileStore
 
+
 class TestFSBackend(MutableBackendTestBase):
     def setup_method(self, method):
         meta_path = tempfile.mkdtemp()
--- a/MoinMoin/storage/middleware/_tests/test_indexing.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/middleware/_tests/test_indexing.py	Sun Feb 17 04:01:18 2013 +0100
@@ -31,7 +31,7 @@
 
 
 class TestIndexingMiddleware(object):
-    reinit_storage = True # cleanup after each test method
+    reinit_storage = True  # cleanup after each test method
 
     def setup_method(self, method):
         self.imw = flaskg.unprotected_storage
@@ -41,7 +41,7 @@
 
     def test_nonexisting_item(self):
         item = self.imw[u'foo']
-        assert not item # does not exist
+        assert not item  # does not exist
 
     def test_store_revision(self):
         item_name = u'foo'
@@ -52,7 +52,7 @@
         revid = rev.revid
         # check if we have the revision now:
         item = self.imw[item_name]
-        assert item # does exist
+        assert item  # does exist
         rev = item.get_revision(revid)
         assert rev.name == item_name
         assert rev.data.read() == data
@@ -76,8 +76,8 @@
         assert rev.meta[COMMENT] == u'no spam'
         assert rev.data.read() == newdata
         revids = [rev.revid for rev in item.iter_revs()]
-        assert len(revids) == 1 # we still have the revision, cleared
-        assert revid in revids # it is still same revid
+        assert len(revids) == 1  # we still have the revision, cleared
+        assert revid in revids  # it is still same revid
 
     def test_destroy_revision(self):
         item_name = u'foo'
@@ -134,7 +134,7 @@
         item.destroy_all_revisions()
         # check if the item was destroyed:
         item = self.imw[item_name]
-        assert not item # does not exist
+        assert not item  # does not exist
 
     def test_all_revisions(self):
         item_name = u'foo'
@@ -393,8 +393,9 @@
         item = self.imw[item_name]
         assert item.parentnames == [u'p1', u'p2', u'p3/p4', ]  # one p2 duplicate removed
 
+
 class TestProtectedIndexingMiddleware(object):
-    reinit_storage = True # cleanup after each test method
+    reinit_storage = True  # cleanup after each test method
 
     class Config(wikiconfig.Config):
         auth = [GivenAuth(user_name=u'joe', autocreate=True), ]
@@ -412,7 +413,7 @@
                                 StringIO('public content'), return_rev=True)
         revid_public = r.revid
         revids = [rev.revid for rev in self.imw.documents()
-                  if rev.name != u'joe'] # the user profile is a revision in the backend
+                  if rev.name != u'joe']  # the user profile is a revision in the backend
         assert revids == [revid_public]
 
     def test_getitem(self):
--- a/MoinMoin/storage/middleware/_tests/test_protecting.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/middleware/_tests/test_protecting.py	Sun Feb 17 04:01:18 2013 +0100
@@ -26,12 +26,14 @@
     ('', dict(before=u'', default=u'All:read,write,create', after=u'', hierarchic=False)),
 ]
 
+
 class FakeUser(object):
     """
     fake user object, just to give user.name
     """
     def __init__(self, name):
         self.name = [name, ]
+
     @property
     def name0(self):
         return self.name[0]
--- a/MoinMoin/storage/middleware/_tests/test_routing.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/middleware/_tests/test_routing.py	Sun Feb 17 04:01:18 2013 +0100
@@ -47,6 +47,7 @@
 
     return router
 
+
 def test_store_get_del(router):
     default_name = u'foo'
     default_backend_name, default_revid = router.store(dict(name=[default_name, ]), StringIO(''))
@@ -70,8 +71,9 @@
     with pytest.raises(TypeError):
         router.store(dict(name=[u'ro:testing', ]), StringIO(''))
 
+
 def test_del_readonly_fails(router):
-    ro_be_name, ro_id = next(iter(router)) # we have only readonly items
+    ro_be_name, ro_id = next(iter(router))  # we have only readonly items
     print ro_be_name, ro_id
     with pytest.raises(TypeError):
         router.remove(ro_be_name, ro_id)
--- a/MoinMoin/storage/middleware/_tests/test_serialization.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/middleware/_tests/test_serialization.py	Sun Feb 17 04:01:18 2013 +0100
@@ -38,14 +38,17 @@
 def pytest_generate_tests(metafunc):
     metafunc.addcall(id='Simple->Simple', param=('Simple', 'Simple'))
 
+
 def pytest_funcarg__source(request):
     # scenario
     return make_middleware(request)
 
+
 def pytest_funcarg__target(request):
     # scenario
     return make_middleware(request)
 
+
 def make_middleware(request):
     tmpdir = request.getfuncargvalue('tmpdir')
     # scenario
@@ -61,7 +64,7 @@
     request.addfinalizer(backend.destroy)
     request.addfinalizer(backend.close)
 
-    mw = IndexingMiddleware(index_storage=(WHOOSH_FILESTORAGE, (str(tmpdir/'foo'), ), {}),
+    mw = IndexingMiddleware(index_storage=(WHOOSH_FILESTORAGE, (str(tmpdir / 'foo'), ), {}),
                             backend=backend)
     mw.create()
     mw.open()
--- a/MoinMoin/storage/middleware/_tests/test_validation.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/middleware/_tests/test_validation.py	Sun Feb 17 04:01:18 2013 +0100
@@ -35,8 +35,8 @@
             keys.TAGS: [u"foo", u"bar"],
         }
 
-        state = {'trusted': False, # True for loading a serialized representation or other trusted sources
-                 keys.NAME: u'somename', # name we decoded from URL path
+        state = {'trusted': False,  # True for loading a serialized representation or other trusted sources
+                 keys.NAME: u'somename',  # name we decoded from URL path
                  keys.ACTION: u'SAVE',
                  keys.HOSTNAME: u'localhost',
                  keys.ADDRESS: u'127.0.0.1',
@@ -69,8 +69,8 @@
             keys.EMAIL: u"foo@example.org",
         }
 
-        state = {'trusted': False, # True for loading a serialized representation or other trusted sources
-                 keys.NAME: u'somename', # name we decoded from URL path
+        state = {'trusted': False,  # True for loading a serialized representation or other trusted sources
+                 keys.NAME: u'somename',  # name we decoded from URL path
                  keys.ACTION: u'SAVE',
                  keys.HOSTNAME: u'localhost',
                  keys.ADDRESS: u'127.0.0.1',
--- a/MoinMoin/storage/stores/_tests/test_all.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/stores/_tests/test_all.py	Sun Feb 17 04:01:18 2013 +0100
@@ -11,6 +11,7 @@
 
 import pytest
 
+
 def test_getitem_raises(store):
     with pytest.raises(KeyError):
         store['doesnotexist']
@@ -24,6 +25,7 @@
     with pytest.raises(KeyError):
         store[k]
 
+
 def test_setitem_getitem_delitem_binary(store):
     k, v = 'key', '\000\001\002'
     store[k] = v
--- a/MoinMoin/storage/stores/_tests/test_kt.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/stores/_tests/test_kt.py	Sun Feb 17 04:01:18 2013 +0100
@@ -35,6 +35,7 @@
     store = Store()
     store.destroy()
 
+
 @pytest.mark.multi(Store=[BytesStore, FileStore])
 def test_from_uri(Store):
     store = Store.from_uri("localhost")
--- a/MoinMoin/storage/stores/_tests/test_memory.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/stores/_tests/test_memory.py	Sun Feb 17 04:01:18 2013 +0100
@@ -22,6 +22,7 @@
 
     return store
 
+
 @pytest.mark.multi(Store=[BytesStore, FileStore])
 def test_destroy(Store):
     store = test_create(Store)
@@ -29,6 +30,7 @@
     store.destroy()
     assert store._st is None
 
+
 @pytest.mark.multi(Store=[BytesStore, FileStore])
 def test_from_uri(Store):
     store = Store.from_uri("mem://")
--- a/MoinMoin/storage/stores/_tests/test_mongodb.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/stores/_tests/test_mongodb.py	Sun Feb 17 04:01:18 2013 +0100
@@ -24,11 +24,13 @@
     store.create()
     return store
 
+
 @pytest.mark.multi(Store=[BytesStore, FileStore])
 def test_destroy(Store):
     store = Store()
     store.destroy()
 
+
 @pytest.mark.multi(Store=[BytesStore, FileStore])
 def test_from_uri(Store):
     store = Store.from_uri("mongodb://localhost/test_base::test_coll")
--- a/MoinMoin/storage/stores/_tests/test_sqla.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/stores/_tests/test_sqla.py	Sun Feb 17 04:01:18 2013 +0100
@@ -11,6 +11,7 @@
 pytest.importorskip('MoinMoin.storage.stores.sqla')
 from ..sqla import BytesStore, FileStore
 
+
 @pytest.mark.multi(Store=[BytesStore, FileStore])
 def test_create(tmpdir, Store):
     dbfile = tmpdir.join('store.sqlite')
@@ -21,6 +22,7 @@
     assert dbfile.check()
     return store
 
+
 @pytest.mark.multi(Store=[BytesStore, FileStore])
 def test_destroy(tmpdir, Store):
     dbfile = tmpdir.join('store.sqlite')
@@ -28,6 +30,7 @@
     store.destroy()
     # XXX: check for dropped table
 
+
 @pytest.mark.multi(Store=[BytesStore, FileStore])
 def test_from_uri(tmpdir, Store):
     store = Store.from_uri("sqlite://%s::test_base" % tmpdir)
--- a/MoinMoin/storage/stores/_tests/test_sqlite.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/storage/stores/_tests/test_sqlite.py	Sun Feb 17 04:01:18 2013 +0100
@@ -11,16 +11,23 @@
 
 from ..sqlite import BytesStore, FileStore
 
+
 def bytes_compressed(path):
     return BytesStore(path, 'test_table', compression_level=1)
+
+
 def bytes_uncompressed(path):
     return BytesStore(path, 'test_table', compression_level=0)
 
+
 def file_compressed(path):
     return FileStore(path, 'test_table', compression_level=1)
+
+
 def file_uncompressed(path):
     return FileStore(path, 'test_table', compression_level=0)
 
+
 all_setups = pytest.mark.multi(Store=[
     bytes_uncompressed,
     bytes_compressed,
@@ -39,6 +46,7 @@
     assert dbfile.check()
     return store
 
+
 @all_setups
 def test_destroy(tmpdir, Store):
     dbfile = tmpdir.join('store.sqlite')
@@ -46,6 +54,7 @@
     store.destroy()
     # XXX: check for dropped table
 
+
 @pytest.mark.multi(Store=[BytesStore, FileStore])
 def test_from_uri(tmpdir, Store):
     store = Store.from_uri("%s::test_table::0" % tmpdir)
--- a/MoinMoin/themes/_tests/test_navi_bar.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/themes/_tests/test_navi_bar.py	Sun Feb 17 04:01:18 2013 +0100
@@ -13,6 +13,7 @@
 from MoinMoin.themes import ThemeSupport
 from MoinMoin import themes
 
+
 class TestNaviBar(object):
     class Config(wikiconfig.Config):
         interwiki_map = dict(Self='http://localhost:8080/', MoinMoin='http://moinmo.in/', )
@@ -53,6 +54,7 @@
         expected = 'moin/moin-2.0'
         assert test_result == expected, ('Expected "%(expected)s" but got "%(test_result)s"') % locals()
 
+
 def test_shorten_item_name():
     test_result1 = themes.shorten_item_name(u'MoinMoin/some/value', 0)
     assert test_result1 == u'valu...lue'
@@ -61,6 +63,7 @@
     test_result3 = themes.shorten_item_name(u'MoinMoin/some/value')
     assert test_result3 == u'MoinMoin/some/value'
 
+
 def test_contenttype_to_class():
     test_result = themes.contenttype_to_class(u'MoinMoin/some/value')
     expected = u'moin-mime-MoinMoin'
--- a/MoinMoin/util/_tests/test_crypto.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_crypto.py	Sun Feb 17 04:01:18 2013 +0100
@@ -33,11 +33,11 @@
 
     def test_validtoken(self):
         """ validate the token """
-        test_key, test_token = crypto.generate_token(key='MoinMoin') # having some key value
+        test_key, test_token = crypto.generate_token(key='MoinMoin')  # having some key value
         result = crypto.valid_token(test_key, test_token)
         assert result
 
-        test_key, test_token = crypto.generate_token() # key value is none
+        test_key, test_token = crypto.generate_token()  # key value is none
         result = crypto.valid_token(test_key, test_token)
         assert result
 
--- a/MoinMoin/util/_tests/test_diff3.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_diff3.py	Sun Feb 17 04:01:18 2013 +0100
@@ -8,6 +8,7 @@
 
 from MoinMoin.util import diff3
 
+
 class TestDiff3:
 
     def testTextMerge(self):
--- a/MoinMoin/util/_tests/test_diff_html.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_diff_html.py	Sun Feb 17 04:01:18 2013 +0100
@@ -9,6 +9,7 @@
 
 from MoinMoin.util import diff_html
 
+
 def test_indent():
     # input text
     test_input = """ \n
@@ -30,6 +31,7 @@
     result = diff_html.indent(test_input)
     assert result == expected
 
+
 def test_diff():
     test_input1 = """ \n
 
--- a/MoinMoin/util/_tests/test_diff_text.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_diff_text.py	Sun Feb 17 04:01:18 2013 +0100
@@ -8,6 +8,7 @@
 
 from MoinMoin.util import diff_text
 
+
 class TestDiffText(object):
 
     def testDiff(self):
--- a/MoinMoin/util/_tests/test_filesys.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_filesys.py	Sun Feb 17 04:01:18 2013 +0100
@@ -5,8 +5,11 @@
     MoinMoin - MoinMoin.util.filesys Tests
 """
 
-import sys, os, time
-import shutil, tempfile
+import sys
+import os
+import time
+import shutil
+import tempfile
 
 import pytest
 
@@ -15,6 +18,7 @@
 win32_only = pytest.mark.skipif("sys.platform != 'win32'")
 win32_incompatible = pytest.mark.skipif("sys.platform == 'win32'")
 
+
 class TestFuid(object):
     """ test filesys.fuid (a better mtime() alternative for up-to-date checking) """
 
@@ -52,7 +56,7 @@
         self.makefile(self.fname, "foofoo")
         uid2 = filesys.fuid(self.fname)
 
-        assert uid2 != uid1 # we changed size and maybe mtime
+        assert uid2 != uid1  # we changed size and maybe mtime
 
     @win32_incompatible
     def testUpdateFileMovingFromTemp(self):
@@ -66,7 +70,7 @@
         os.rename(self.tmpname, self.fname)
         uid2 = filesys.fuid(self.fname)
 
-        assert uid2 != uid1 # we didn't change size, but inode and maybe mtime
+        assert uid2 != uid1  # we didn't change size, but inode and maybe mtime
 
     @win32_only
     def testStale(self):
@@ -75,7 +79,7 @@
         self.makefile(self.fname, "foo")
         uid1 = filesys.fuid(self.fname)
 
-        time.sleep(2) # thanks for waiting :)
+        time.sleep(2)  # thanks for waiting :)
         uid2 = filesys.fuid(self.fname, max_staleness=1)
         assert uid2 != uid1  # should be considered stale if platform has no inode support
 
@@ -167,4 +171,5 @@
         with pytest.raises(OSError):
             filesys.copytree(self.test_dir, self.test_dest_dir)
 
+
 coverage_modules = ['MoinMoin.util.filesys']
--- a/MoinMoin/util/_tests/test_forms.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_forms.py	Sun Feb 17 04:01:18 2013 +0100
@@ -21,6 +21,7 @@
 
 test_attributes = {'type': 'submit', u'required': 'test_required', 'autofocus': None, 'placeholder': None}
 
+
 def test_label_filter():
     # when content is None
     result1 = forms.label_filter('test_tagname', test_attributes, None, 'test_context', test_bind)
@@ -32,6 +33,7 @@
     expected = 'new_content'
     assert result2 == expected
 
+
 def test_button_filter():
     result = forms.button_filter('test_tagname', test_attributes, 'new_content', 'test_context', None)
     expected = 'new_content'
@@ -50,6 +52,7 @@
     expected = 'test_bind_default'
     assert content_result == expected
 
+
 def test_required_filter():
     test_bind.optional = False
     test_attributes[u'class'] = 'test_class'
@@ -68,6 +71,7 @@
     expected = u'required'
     assert attribute_result == expected
 
+
 def test_autofocus_filter():
     test_bind.properties = {'autofocus': True}
     content_result = forms.autofocus_filter('test_tagname', test_attributes, 'new_content', 'test_context', test_bind)
@@ -75,6 +79,7 @@
     attribute_result = test_attributes[u'autofocus']
     assert attribute_result == u'autofocus'
 
+
 def test_placeholder_filter():
     test_bind.properties['placeholder'] = 'test_placeholder'
     content_result = forms.placeholder_filter('test_tagname', test_attributes, 'new_content', 'test_context', test_bind)
@@ -82,6 +87,7 @@
     attribute_result = test_attributes['placeholder']
     assert attribute_result == 'test_placeholder'
 
+
 def test_error_filter_factory():
     # when 'class' not in test_attributes
     test_bind.errors = 'test_errors'
--- a/MoinMoin/util/_tests/test_interwiki.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_interwiki.py	Sun Feb 17 04:01:18 2013 +0100
@@ -9,17 +9,18 @@
 
 from __future__ import absolute_import, division
 
-import pytest
 import tempfile
 import os.path
 import shutil
 
+import pytest
+from flask import current_app as app
+
 from MoinMoin.util.interwiki import split_interwiki, join_wiki, InterWikiMap, url_for_item, _split_namespace
 from MoinMoin._tests import wikiconfig
 from MoinMoin.constants.keys import CURRENT
 from MoinMoin.app import before_wiki
 
-from flask import current_app as app
 
 class TestInterWiki(object):
     class Config(wikiconfig.Config):
@@ -121,6 +122,7 @@
         for (baseurl, pagename, namespace), url in tests:
             assert join_wiki(baseurl, pagename, namespace) == url
 
+
 class TestInterWikiMapBackend(object):
     """
     tests for interwiki map
--- a/MoinMoin/util/_tests/test_iri.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_iri.py	Sun Feb 17 04:01:18 2013 +0100
@@ -11,6 +11,7 @@
 
 from MoinMoin.util.iri import *
 
+
 def test_Iri_init_1():
     u = Iri(scheme='wiki', path='/StartSeite', query='action=raw')
     assert u.scheme == 'wiki'
@@ -19,6 +20,7 @@
     assert u.query == 'action=raw'
     assert u.fragment is None
 
+
 def test_Iri_init_2():
     i = 'wiki://MoinMoin/StartSeite?action=raw#body'
     u = Iri(i, scheme='newwiki', path='/newStartSeite', query='action=false')
@@ -28,12 +30,14 @@
     assert u.query == 'action=false'
     assert u.fragment == 'body'
 
+
 def test_Iri_init_3():
     i = Iri(scheme='wiki', path='/StartSeite', query='action=raw')
     u = Iri(i)
     assert i is not u
     assert i == u
 
+
 def test_Iri_parser():
     i = 'http://moinmo.in/StartSeite?action=raw#body'
     u = Iri(i)
@@ -179,6 +183,7 @@
     assert u.fragment == 'body'
     assert unicode(u) == i
 
+
 def test_Iri_2():
     i = 'wiki://MoinMoin/StartSeite?action=raw#body'
     u = Iri(i)
@@ -198,6 +203,7 @@
     assert u.fragment == 'body'
     assert unicode(u) == i
 
+
 def test_Iri_3():
     i = 'wiki.local:StartSeite?action=raw#body'
     u = Iri(i)
@@ -208,6 +214,7 @@
     assert u.fragment == 'body'
     assert unicode(u) == i
 
+
 def test_Iri_add_1():
     base = Iri('wiki://moinmo.in/Some/Page?action=raw#body')
 
@@ -274,8 +281,10 @@
     assert u.query == 'action=raw'
     assert u.fragment == 'head'
 
+
 def test_Iri_quote_1():
-    u = Iri(scheme=u'wiki', authority=u'authority_ä%?#', path=u'/path_ä%?#', query=u'query_ä%?#', fragment=u'fragment_ä%?#')
+    u = Iri(scheme=u'wiki', authority=u'authority_ä%?#',
+            path=u'/path_ä%?#', query=u'query_ä%?#', fragment=u'fragment_ä%?#')
     assert u.scheme == u'wiki'
     assert u.authority == u'authority_ä%?#'
     authority = u'authority_ä%25%3F%23'
@@ -299,6 +308,7 @@
     assert u.fragment.urlquoted == u'fragment_%C3%A4%25?%23'
     assert unicode(u) == u'wiki://{0}{1}?{2}#{3}'.format(authority, path, query, fragment)
 
+
 def test_Iri_quote_2():
     authority = u'authority_ä%25%3F%23'
     path = u'/path_ä%25%3F%23'
@@ -308,6 +318,7 @@
     u = Iri(i)
     assert unicode(u) == i
 
+
 def test_Iri_quote_3():
     i = u'wiki:///path_%92%92'
     u = Iri(i)
@@ -315,6 +326,7 @@
     assert u.path.quoted == u'/path_%92%92'
     assert unicode(u) == i
 
+
 def test_IriAuthority_parser_1():
     i = 'moinmo.in'
     u = IriAuthority(i)
@@ -323,6 +335,7 @@
     assert u.port is None
     assert unicode(u) == i
 
+
 def test_IriAuthority_parser_2():
     i = '@moinmo.in:'
     u = IriAuthority(i)
@@ -331,6 +344,7 @@
     assert u.port == 0
     assert unicode(u) == i
 
+
 def test_IriAuthority_parser_3():
     i = 'test:test@moinmo.in:1234'
     u = IriAuthority(i)
@@ -339,6 +353,7 @@
     assert u.port == 1234
     assert unicode(u) == i
 
+
 def test_IriPath_1():
     i = '/'
     u = IriPath(i)
@@ -347,6 +362,7 @@
     assert u[1] == ''
     assert unicode(u) == i
 
+
 def test_IriPath_2():
     i = '/.'
     u = IriPath(i)
@@ -362,6 +378,7 @@
     assert u[1] == ''
     assert unicode(u) == '/'
 
+
 def test_IriPath_3():
     i = '/..'
     u = IriPath(i)
@@ -377,6 +394,7 @@
     assert u[1] == ''
     assert unicode(u) == '/'
 
+
 def test_IriPath_4():
     i = '/test'
     u = IriPath(i)
@@ -407,6 +425,7 @@
     assert u[1] == ''
     assert unicode(u) == '/'
 
+
 def test_IriPath_5():
     i = '/test/test1/../../test2'
     u = IriPath(i)
--- a/MoinMoin/util/_tests/test_mime.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_mime.py	Sun Feb 17 04:01:18 2013 +0100
@@ -8,12 +8,14 @@
 
 from MoinMoin.util.mime import *
 
+
 def test_Type_init_1():
     t = Type(type='foo', subtype='bar', parameters={'foo': 'bar'})
     assert t.type == 'foo'
     assert t.subtype == 'bar'
     assert t.parameters == {'foo': 'bar'}
 
+
 def test_Type_init_2():
     i = 'text/plain;encoding=utf-8'
     t = Type(i, type='foo', subtype='bar', parameters={'foo': 'bar'})
@@ -21,6 +23,7 @@
     assert t.subtype == 'bar'
     assert t.parameters == {'encoding': 'utf-8', 'foo': 'bar'}
 
+
 def test_Type_init_3():
     i = Type(type='foo', subtype='bar')
     t = Type(i)
@@ -28,6 +31,7 @@
     assert i == t
     assert i.parameters is not t.parameters
 
+
 def test_Type_text():
     i = '*/*'
     t = Type(i)
@@ -62,6 +66,7 @@
     assert t.parameters == {'encoding': 'utf-8', 'foo': '['}
     assert unicode(t) == i
 
+
 def test_Type_compare():
     t1 = Type(type='text', subtype='plain')
 
--- a/MoinMoin/util/_tests/test_mimetype.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_mimetype.py	Sun Feb 17 04:01:18 2013 +0100
@@ -9,6 +9,7 @@
 
 from MoinMoin.util import mimetype
 
+
 class TestMimeType(object):
     """ Test: util.mimetype """
 
--- a/MoinMoin/util/_tests/test_paramparser.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_paramparser.py	Sun Feb 17 04:01:18 2013 +0100
@@ -22,7 +22,7 @@
                   (u' a , b , c , d ',        (abcd, {}, [])),
                   (u'   a   ',                ([u'a'], {}, [])),
                   (u'"  a  "',                ([u'  a  '], {}, [])),
-                  (u'a,b,c,d, "a,b,c,d"',     (abcd+[u'a,b,c,d'], {}, [])),
+                  (u'a,b,c,d, "a,b,c,d"',     (abcd + [u'a,b,c,d'], {}, [])),
                   (u'quote " :), b',          ([u'quote " :)', u'b'], {}, [])),
                   (u'"quote "" :)", b',       ([u'quote " :)', u'b'], {}, [])),
                   (u'=7',                     ([], {u'': u'7'}, [])),
@@ -320,6 +320,7 @@
         for test in tests:
             yield [_check] + list(test)
 
+
 class TestArgGetters(object):
     def testGetBoolean(self):
         tests = [
@@ -360,7 +361,7 @@
         pytest.raises(ValueError, paramparser.get_bool, u'')
         pytest.raises(ValueError, paramparser.get_bool, u'42')
         pytest.raises(ValueError, paramparser.get_bool, u'wrong')
-        pytest.raises(ValueError, paramparser.get_bool, u'"True"') # must not be quoted!
+        pytest.raises(ValueError, paramparser.get_bool, u'"True"')  # must not be quoted!
 
     def testGetInt(self):
         tests = [
@@ -394,7 +395,7 @@
         pytest.raises(ValueError, paramparser.get_int, u'')
         pytest.raises(ValueError, paramparser.get_int, u'23.42')
         pytest.raises(ValueError, paramparser.get_int, u'wrong')
-        pytest.raises(ValueError, paramparser.get_int, u'"4711"') # must not be quoted!
+        pytest.raises(ValueError, paramparser.get_int, u'"4711"')  # must not be quoted!
 
     def testGetFloat(self):
         tests = [
@@ -429,7 +430,7 @@
         # any value not convertable to int raises ValueError
         pytest.raises(ValueError, paramparser.get_float, u'')
         pytest.raises(ValueError, paramparser.get_float, u'wrong')
-        pytest.raises(ValueError, paramparser.get_float, u'"47.11"') # must not be quoted!
+        pytest.raises(ValueError, paramparser.get_float, u'"47.11"')  # must not be quoted!
 
     def testGetComplex(self):
         tests = [
@@ -444,10 +445,10 @@
             (u'-23.42', None, None, -23.42),
             (u'-23.42E3', None, None, -23.42E3),
             (u'23.42E-3', None, None, 23.42E-3),
-            (u'23.42E-3+3.04j', None, None, 23.42E-3+3.04j),
+            (u'23.42E-3+3.04j', None, None, 23.42E-3 + 3.04j),
             (u'3.04j', None, None, 3.04j),
             (u'-3.04j', None, None, -3.04j),
-            (u'23.42E-3+3.04i', None, None, 23.42E-3+3.04j),
+            (u'23.42E-3+3.04i', None, None, 23.42E-3 + 3.04j),
             (u'3.04i', None, None, 3.04j),
             (u'-3.04i', None, None, -3.04j),
             (u'-3', None, None, -3L),
@@ -476,7 +477,7 @@
         pytest.raises(ValueError, paramparser.get_complex, u'3Ij')
         pytest.raises(ValueError, paramparser.get_complex, u'3i-3i')
         pytest.raises(ValueError, paramparser.get_complex, u'wrong')
-        pytest.raises(ValueError, paramparser.get_complex, u'"47.11"') # must not be quoted!
+        pytest.raises(ValueError, paramparser.get_complex, u'"47.11"')  # must not be quoted!
 
     def testGetUnicode(self):
         tests = [
--- a/MoinMoin/util/_tests/test_pysupport.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_pysupport.py	Sun Feb 17 04:01:18 2013 +0100
@@ -7,7 +7,8 @@
 """
 
 
-import os, errno
+import os
+import errno
 
 import pytest
 
@@ -133,5 +134,6 @@
                 if err.errno != errno.ENOENT:
                     raise
 
+
 coverage_modules = ['MoinMoin.util.pysupport']
 pytest.main("-x test_pysupport.py")
--- a/MoinMoin/util/_tests/test_registry.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_registry.py	Sun Feb 17 04:01:18 2013 +0100
@@ -10,19 +10,24 @@
 
 from MoinMoin.util.registry import *
 
+
 def factory_all(arg):
     return 1
 
+
 def factory_all2(arg):
     return 3
 
+
 def factory_none(arg):
     pass
 
+
 def factory_special(arg):
     if arg == 'a':
         return 2
 
+
 def test_Registry_get():
     r = Registry()
 
@@ -38,6 +43,7 @@
     assert r.get(None) == 3
     assert r.get('a') == 3
 
+
 def test_Registry_lifecycle():
     r = Registry()
 
--- a/MoinMoin/util/_tests/test_send_file.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_send_file.py	Sun Feb 17 04:01:18 2013 +0100
@@ -7,10 +7,13 @@
 """
 
 import os
-import tempfile, shutil
+import tempfile
+import shutil
+
+import pytest
 
 from MoinMoin.util import send_file
-import pytest
+
 
 class TestFuid(object):
     """ test for send_file """
--- a/MoinMoin/util/_tests/test_thread_monitor.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_thread_monitor.py	Sun Feb 17 04:01:18 2013 +0100
@@ -6,11 +6,13 @@
 MoinMoin - MoinMoin.util.thread_monitor Tests
 """
 
-import shutil, tempfile
+import shutil
+import tempfile
 import os
 
 from MoinMoin.util.thread_monitor import Monitor
 
+
 class TestMonitor(object):
     """ Tests: Monitor """
 
--- a/MoinMoin/util/_tests/test_tree.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_tree.py	Sun Feb 17 04:01:18 2013 +0100
@@ -8,6 +8,7 @@
 
 from MoinMoin.util.tree import *
 
+
 def test_Name():
     uri = 'uri:a'
 
@@ -21,6 +22,7 @@
     assert isinstance(element, ET.Element)
     assert element.tag == name
 
+
 def test_Namespace():
     uri = 'uri:a'
 
@@ -58,8 +60,10 @@
     assert name.name == 'class_'
     assert name.uri == uri
 
+
 def test_html():
     assert isinstance(html, Namespace)
 
+
 def test_moin_page():
     assert isinstance(moin_page, Namespace)
--- a/MoinMoin/util/_tests/test_util.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_util.py	Sun Feb 17 04:01:18 2013 +0100
@@ -8,6 +8,7 @@
 
 from MoinMoin import util
 
+
 class TestUtil(object):
 
     def testRangeList(self):
--- a/MoinMoin/util/_tests/test_version.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/MoinMoin/util/_tests/test_version.py	Sun Feb 17 04:01:18 2013 +0100
@@ -6,8 +6,10 @@
 """
 
 
+import pytest
+
 from MoinMoin.util.version import Version
-import pytest
+
 
 class TestVersion(object):
     def test_Version(self):
--- a/_ui_tests/conftest.py	Sat Feb 16 16:28:28 2013 +0100
+++ b/_ui_tests/conftest.py	Sun Feb 17 04:01:18 2013 +0100
@@ -9,6 +9,7 @@
 
 import os
 import sys
+
 sys.path.append(os.path.dirname(__file__))
 import driver_register