[py-svn] pytest commit 0b0933c4cacd: some pep8 fixes

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Sat Nov 13 23:34:02 CET 2010


# HG changeset patch -- Bitbucket.org
# Project pytest
# URL http://bitbucket.org/hpk42/pytest/overview
# User holger krekel <holger at merlinux.eu>
# Date 1289687630 -3600
# Node ID 0b0933c4cacdc941cc23dd3114f171457186d0d1
# Parent  8295dc9f529f957ad5e552d575b55bf36e2dbf91
some pep8 fixes

--- a/_pytest/helpconfig.py
+++ b/_pytest/helpconfig.py
@@ -129,7 +129,7 @@ def pytest_plugin_registered(manager, pl
             #    print "matching hook:", formatdef(method)
         if fail:
             name = getattr(plugin, '__name__', plugin)
-            raise PluginValidationError("%s:\n%s" %(name, stringio.getvalue()))
+            raise PluginValidationError("%s:\n%s" % (name, stringio.getvalue()))
 
 class PluginValidationError(Exception):
     """ plugin failed validation. """
@@ -151,7 +151,7 @@ def collectattr(obj):
     return methods
 
 def formatdef(func):
-    return "%s%s" %(
+    return "%s%s" % (
         func.__name__,
         inspect.formatargspec(*inspect.getargspec(func))
     )

--- a/_pytest/standalonetemplate.py
+++ b/_pytest/standalonetemplate.py
@@ -15,7 +15,7 @@ class DictImporter(object):
     def find_module(self, fullname, path=None):
         if fullname in self.sources:
             return self
-        if fullname+'.__init__' in self.sources:
+        if fullname + '.__init__' in self.sources:
             return self
         return None
 
@@ -26,7 +26,7 @@ class DictImporter(object):
             s = self.sources[fullname]
             is_pkg = False
         except KeyError:
-            s = self.sources[fullname+'.__init__']
+            s = self.sources[fullname + '.__init__']
             is_pkg = True
 
         co = compile(s, fullname, 'exec')
@@ -42,11 +42,11 @@ class DictImporter(object):
     def get_source(self, name):
         res = self.sources.get(name)
         if res is None:
-            res = self.sources.get(name+'.__init__')
+            res = self.sources.get(name + '.__init__')
         return res
 
 if __name__ == "__main__":
-    if sys.version_info >= (3,0):
+    if sys.version_info >= (3, 0):
         exec("def do_exec(co, loc): exec(co, loc)\n")
         import pickle
         sources = sources.encode("ascii") # ensure bytes

--- a/tox.ini
+++ b/tox.ini
@@ -57,6 +57,6 @@ commands=
 [pytest]
 minversion=2.0
 plugins=pytester
-addopts=-rfx --pyargs
+#addopts= -rxf --pyargs
 rsyncdirs=tox.ini pytest.py _pytest testing
 

--- a/example/assertion/global_testmodule_config/conftest.py
+++ b/example/assertion/global_testmodule_config/conftest.py
@@ -1,4 +1,4 @@
-import py
+import pytest, py
 mydir = py.path.local(__file__).dirpath()
 
 def pytest_runtest_setup(item):



More information about the pytest-commit mailing list