Fix flake8 in features branch

This commit is contained in:
Bruno Oliveira
2017-07-17 21:16:14 -03:00
parent 4fd92ef9ba
commit 7b1870a94e
13 changed files with 61 additions and 54 deletions

View File

@@ -281,7 +281,10 @@ class PyCollector(PyobjMixin, main.Collector):
obj = safe_getattr(obj, '__func__', False)
if obj is False:
# Python 2.6 wraps in a different way that we won't try to handle
self.warn(code="C2", message="cannot collect static method %r because it is not a function (always the case in Python 2.6)" % name)
msg = "cannot collect static method %r because " \
"it is not a function (always the case in Python 2.6)"
self.warn(
code="C2", message=msg % name)
return False
return (
safe_getattr(obj, "__call__", False) and fixtures.getfixturemarker(obj) is None
@@ -1510,6 +1513,7 @@ class ApproxNonIterable(object):
# the basic pytest Function item
#
class Function(FunctionMixin, main.Item, fixtures.FuncargnamesCompatAttr):
""" a Function Item is responsible for setting up and executing a
Python test function.