Fixed E402 flake8 errors
module level import not at top of file
This commit is contained in:
parent
45ac863069
commit
b9e318866e
|
@ -12,9 +12,6 @@ from _pytest._code.code import (
|
||||||
ReprExceptionInfo,
|
ReprExceptionInfo,
|
||||||
ExceptionChainRepr)
|
ExceptionChainRepr)
|
||||||
|
|
||||||
queue = py.builtin._tryimport('queue', 'Queue')
|
|
||||||
|
|
||||||
failsonjython = pytest.mark.xfail("sys.platform.startswith('java')")
|
|
||||||
from test_source import astonly
|
from test_source import astonly
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -24,7 +21,10 @@ except ImportError:
|
||||||
else:
|
else:
|
||||||
invalidate_import_caches = getattr(importlib, "invalidate_caches", None)
|
invalidate_import_caches = getattr(importlib, "invalidate_caches", None)
|
||||||
|
|
||||||
import pytest
|
queue = py.builtin._tryimport('queue', 'Queue')
|
||||||
|
|
||||||
|
failsonjython = pytest.mark.xfail("sys.platform.startswith('java')")
|
||||||
|
|
||||||
pytest_version_info = tuple(map(int, pytest.__version__.split(".")[:3]))
|
pytest_version_info = tuple(map(int, pytest.__version__.split(".")[:3]))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
import py_compile
|
import py_compile
|
||||||
import stat
|
import stat
|
||||||
import sys
|
import sys
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
import py
|
import py
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
ast = pytest.importorskip("ast")
|
|
||||||
if sys.platform.startswith("java"):
|
|
||||||
# XXX should be xfail
|
|
||||||
pytest.skip("assert rewrite does currently not work on jython")
|
|
||||||
|
|
||||||
import _pytest._code
|
import _pytest._code
|
||||||
from _pytest.assertion import util
|
from _pytest.assertion import util
|
||||||
from _pytest.assertion.rewrite import rewrite_asserts, PYTEST_TAG, AssertionRewritingHook
|
from _pytest.assertion.rewrite import rewrite_asserts, PYTEST_TAG, AssertionRewritingHook
|
||||||
from _pytest.main import EXIT_NOTESTSCOLLECTED
|
from _pytest.main import EXIT_NOTESTSCOLLECTED
|
||||||
|
|
||||||
|
ast = pytest.importorskip("ast")
|
||||||
|
if sys.platform.startswith("java"):
|
||||||
|
# XXX should be xfail
|
||||||
|
pytest.skip("assert rewrite does currently not work on jython")
|
||||||
|
|
||||||
|
|
||||||
def setup_module(mod):
|
def setup_module(mod):
|
||||||
mod._old_reprcompare = util._reprcompare
|
mod._old_reprcompare = util._reprcompare
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -196,6 +196,6 @@ filterwarnings =
|
||||||
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
|
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E402,E501,E701,E702,E704,E712,E731
|
ignore = E501,E701,E702,E704,E712,E731
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
exclude = _pytest/vendored_packages/pluggy.py
|
exclude = _pytest/vendored_packages/pluggy.py
|
||||||
|
|
Loading…
Reference in New Issue