Fixed E402 flake8 errors

module level import not at top of file
This commit is contained in:
Andras Tim 2017-07-17 01:25:09 +02:00
parent 45ac863069
commit b9e318866e
3 changed files with 11 additions and 11 deletions

View File

@ -12,9 +12,6 @@ from _pytest._code.code import (
ReprExceptionInfo,
ExceptionChainRepr)
queue = py.builtin._tryimport('queue', 'Queue')
failsonjython = pytest.mark.xfail("sys.platform.startswith('java')")
from test_source import astonly
try:
@ -24,7 +21,10 @@ except ImportError:
else:
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]))

View File

@ -1,24 +1,24 @@
from __future__ import absolute_import, division, print_function
import glob
import os
import py_compile
import stat
import sys
import zipfile
import py
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
from _pytest.assertion import util
from _pytest.assertion.rewrite import rewrite_asserts, PYTEST_TAG, AssertionRewritingHook
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):
mod._old_reprcompare = util._reprcompare

View File

@ -196,6 +196,6 @@ filterwarnings =
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
[flake8]
ignore = E402,E501,E701,E702,E704,E712,E731
ignore = E501,E701,E702,E704,E712,E731
max-line-length = 120
exclude = _pytest/vendored_packages/pluggy.py