Fixed flake8 warnings

W191 indentation contains tabs
W292 no newline at end of file
W293 blank line contains whitespace
W391 blank line at end of file
This commit is contained in:
Andras Tim 2017-07-17 01:25:06 +02:00
parent 796ffa5123
commit 6af2abdb53
17 changed files with 9 additions and 23 deletions

View File

@ -645,7 +645,7 @@ class FormattedExcinfo(object):
traceback = traceback[:recursionindex + 1]
else:
extraline = None
return traceback, extraline
def repr_excinfo(self, excinfo):

View File

@ -410,5 +410,3 @@ def getstatementrange_old(lineno, source, assertion=False):
if trysource.isparseable():
return start, end
raise SyntaxError("no valid source range around line %d " % (lineno,))

View File

@ -1126,4 +1126,3 @@ class FixtureManager:
for fixturedef in fixturedefs:
if nodeid.startswith(fixturedef.baseid):
yield fixturedef

View File

@ -325,7 +325,7 @@ def test_getstartingblock_multiline():
self.source = _pytest._code.Frame(frame).statement
x = A('x',
'y' \
'y'
,
'z')
@ -400,6 +400,7 @@ def test_source_of_class_at_eof_without_newline(tmpdir):
s2 = _pytest._code.Source(tmpdir.join("a.py").pyimport().A)
assert str(source).strip() == str(s2).strip()
if True:
def x():
pass
@ -462,6 +463,7 @@ def test_getfslineno():
assert lineno == A_lineno
assert getfslineno(3) == ("", -1)
class B(object):
pass
B.__name__ = "B2"
@ -471,6 +473,7 @@ def test_code_of_object_instance_with_call():
class A(object):
pass
pytest.raises(TypeError, lambda: _pytest._code.Source(A()))
class WithCall(object):
def __call__(self):
pass

View File

@ -10,4 +10,3 @@ if __name__ == '__main__':
hidden.extend(['--hidden-import', x])
args = ['pyinstaller', '--noconfirm'] + hidden + ['runtests_script.py']
subprocess.check_call(' '.join(args), shell=True)

View File

@ -6,4 +6,4 @@ py.test main().
if __name__ == '__main__':
import sys
import pytest
sys.exit(pytest.main())
sys.exit(pytest.main())

View File

@ -3,4 +3,4 @@ def test_upper():
assert 'foo'.upper() == 'FOO'
def test_lower():
assert 'FOO'.lower() == 'foo'
assert 'FOO'.lower() == 'foo'

View File

@ -9,4 +9,4 @@ if __name__ == '__main__':
executable = os.path.join(os.getcwd(), 'dist', 'runtests_script', 'runtests_script')
if sys.platform.startswith('win'):
executable += '.exe'
sys.exit(os.system('%s tests' % executable))
sys.exit(os.system('%s tests' % executable))

View File

@ -309,4 +309,3 @@ class TestApprox(object):
'*At index 0 diff: 3 != 4 * {0}'.format(expected),
'=* 1 failed in *=',
])

View File

@ -3026,6 +3026,3 @@ class TestParameterizedSubRequest(object):
E*{1}:5
*1 failed*
""".format(fixfile.strpath, testfile.basename))

View File

@ -826,4 +826,3 @@ class TestOverrideIniArgs(object):
rootdir, inifile, inicfg = determine_setup(None, ['a/exist'])
assert rootdir == tmpdir
assert inifile is None

View File

@ -932,4 +932,3 @@ class TestDoctestReportingOption(object):
result.stderr.fnmatch_lines([
"*error: argument --doctest-report: invalid choice: 'obviously_invalid_format' (choose from*"
])

View File

@ -1057,4 +1057,3 @@ def test_set_suite_name(testdir, suite_name):
assert result.ret == 0
node = dom.find_first_by_tag("testsuite")
node.assert_attr(name=expected)

View File

@ -114,5 +114,3 @@ class TestPaste(object):
assert 'lexer=%s' % lexer in data.decode()
assert 'code=full-paste-contents' in data.decode()
assert 'expiry=1week' in data.decode()

View File

@ -224,5 +224,3 @@ def test_failure_issue380(testdir):
""")
result = testdir.runpytest("--resultlog=log")
assert result.ret == 2

View File

@ -754,5 +754,3 @@ class TestReportContents(object):
rep = reports[1]
assert rep.capstdout == ''
assert rep.capstderr == ''

View File

@ -196,6 +196,6 @@ filterwarnings =
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
[flake8]
ignore = E101,E111,E113,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E201,E202,E203,E221,E222,E225,E226,E231,E241,E251,E261,E262,E265,E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731,W191,W292,W293,W391
ignore = E101,E111,E113,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E201,E202,E203,E221,E222,E225,E226,E231,E241,E251,E261,E262,E265,E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731
max-line-length = 120
exclude = _pytest/vendored_packages/pluggy.py