mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-31 11:16:54 +00:00
Fix import ordering in test files
This commit is contained in:
parent
8d36355611
commit
de9f56addf
11 changed files with 34 additions and 27 deletions
|
|
@ -1,12 +1,12 @@
|
|||
"""Test aggregation of config files and command-line options."""
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from flake8.main import cli
|
||||
from flake8.options import aggregator
|
||||
from flake8.options import manager
|
||||
|
||||
import pytest
|
||||
|
||||
CLI_SPECIFIED_CONFIG = 'tests/fixtures/config_files/cli-specified.ini'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,12 @@ except ImportError:
|
|||
import os
|
||||
import sys
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8.options import config
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
CLI_SPECIFIED_FILEPATH = 'tests/fixtures/config_files/cli-specified.ini'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
"""Unit tests for flake8.options.config.MergedConfigParser."""
|
||||
import os
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8.options import config
|
||||
from flake8.options import manager
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def optmanager():
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
"""Unit tests for the Notifier object."""
|
||||
import pytest
|
||||
|
||||
from flake8.plugins import notifier
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
class _Listener(object):
|
||||
def __init__(self, error_code):
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
"""Unit tests for flake8.options.manager.Option."""
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8.options import manager
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def test_to_optparse():
|
||||
"""Test conversion to an optparse.Option class."""
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
import optparse
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from flake8.options import manager
|
||||
|
||||
import pytest
|
||||
|
||||
TEST_VERSION = '3.0.0b1'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
"""Tests for flake8.plugins.manager.Plugin."""
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8 import exceptions
|
||||
from flake8.plugins import manager
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def test_load_plugin_fallsback_on_old_setuptools():
|
||||
"""Verify we fallback gracefully to on old versions of setuptools."""
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
"""Tests for flake8.plugins.manager.PluginManager."""
|
||||
import mock
|
||||
|
||||
from flake8.plugins import manager
|
||||
|
||||
import mock
|
||||
|
||||
|
||||
def create_entry_point_mock(name):
|
||||
"""Create a mocked EntryPoint."""
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
"""Tests for flake8.plugins.manager.PluginTypeManager."""
|
||||
import collections
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8 import exceptions
|
||||
from flake8.plugins import manager
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
TEST_NAMESPACE = "testing.plugin-type-manager"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
"""Tests for the flake8.style_guide.StyleGuide class."""
|
||||
import optparse
|
||||
|
||||
from flake8 import style_guide
|
||||
from flake8.formatting import base
|
||||
from flake8.plugins import notifier
|
||||
from flake8 import style_guide
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
"""Tests for flake8's utils module."""
|
||||
import os
|
||||
|
||||
from flake8 import utils
|
||||
from flake8.plugins import manager as plugin_manager
|
||||
|
||||
import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from flake8.plugins import manager as plugin_manager
|
||||
from flake8 import utils
|
||||
|
||||
|
||||
RELATIVE_PATHS = ["flake8", "pep8", "pyflakes", "mccabe"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue