diff options
author | Andras Tim <andras.tim@gmail.com> | 2017-07-17 01:25:08 +0200 |
---|---|---|
committer | Andras Tim <andras.tim@gmail.com> | 2017-07-17 01:44:22 +0200 |
commit | 617e510b6e4fb2e95a1486c8f30dd1e7583be248 (patch) | |
tree | 4dcf68d7b42fd781e442cc6d55142bd905b7c8bd /testing/code | |
parent | 4b22f270a3583c97034ab63a343defbee146666a (diff) | |
download | pytest-617e510b6e4fb2e95a1486c8f30dd1e7583be248.tar.gz |
Fixed E231 flake8 errors
missing whitespace after ‘,’, ‘;’, or ‘:’
Diffstat (limited to 'testing/code')
-rw-r--r-- | testing/code/test_excinfo.py | 2 | ||||
-rw-r--r-- | testing/code/test_source.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py index 96e42de16..2eb340fae 100644 --- a/testing/code/test_excinfo.py +++ b/testing/code/test_excinfo.py @@ -325,7 +325,7 @@ def test_excinfo_no_sourcecode(): except ValueError: excinfo = _pytest._code.ExceptionInfo() s = str(excinfo.traceback[-1]) - if py.std.sys.version_info < (2,5): + if py.std.sys.version_info < (2, 5): assert s == " File '<string>':1 in ?\n ???\n" else: assert s == " File '<string>':1 in <module>\n ???\n" diff --git a/testing/code/test_source.py b/testing/code/test_source.py index 53703fc57..f12b8a1a1 100644 --- a/testing/code/test_source.py +++ b/testing/code/test_source.py @@ -109,7 +109,7 @@ def test_source_strip_multiline(): def test_syntaxerror_rerepresentation(): ex = pytest.raises(SyntaxError, _pytest._code.compile, 'xyz xyz') assert ex.value.lineno == 1 - assert ex.value.offset in (4,7) # XXX pypy/jython versus cpython? + assert ex.value.offset in (4, 7) # XXX pypy/jython versus cpython? assert ex.value.text.strip(), 'x x' def test_isparseable(): @@ -262,7 +262,7 @@ class TestSourceParsingAndCompiling(object): def test_getstatementrange_out_of_bounds_py3(self): source = Source("if xxx:\n from .collections import something") r = source.getstatementrange(1) - assert r == (1,2) + assert r == (1, 2) def test_getstatementrange_with_syntaxerror_issue7(self): source = Source(":") @@ -524,9 +524,9 @@ def test_comments(): comment 4 """ ''' - for line in range(2,6): + for line in range(2, 6): assert str(getstatement(line, source)) == ' x = 1' - for line in range(6,10): + for line in range(6, 10): assert str(getstatement(line, source)) == ' assert False' assert str(getstatement(10, source)) == '"""' @@ -535,7 +535,7 @@ def test_comment_in_statement(): # comment 1 bar=2) ''' - for line in range(1,3): + for line in range(1, 3): assert str(getstatement(line, source)) == \ 'test(foo=1,\n # comment 1\n bar=2)' |