Make flake8 happy

This commit is contained in:
Matus Valo 2020-08-16 22:20:19 +02:00 committed by Asif Saif Uddin
parent 1512c5d609
commit 5b072fb171
10 changed files with 25 additions and 20 deletions

View File

@ -1,7 +1,12 @@
import sys
import functools
import importlib
import pytest
if_pypy = pytest.mark.skipif(getattr(sys, 'pypy_version_info', None), reason='PyPy not supported.')
if_win32 = pytest.mark.skipif(sys.platform.startswith('win32'), reason='Does not work on Windows')
if_pypy = pytest.mark.skipif(
getattr(sys, 'pypy_version_info', None),
reason='PyPy not supported.'
)
if_win32 = pytest.mark.skipif(
sys.platform.startswith('win32'),
reason='Does not work on Windows'
)

View File

@ -5,6 +5,7 @@ import t.skip
pytest.importorskip('boto3')
pytest.importorskip('pycurl')
@t.skip.if_pypy
@pytest.mark.usefixtures('hub')
class AWSCase:

View File

@ -1,13 +1,13 @@
import pytest
pytest.importorskip('pycurl')
from unittest.mock import Mock, call, patch
from kombu.asynchronous.http.curl import READ, WRITE, CurlClient
import t.skip
pytest.importorskip('pycurl')
@t.skip.if_pypy
@pytest.mark.usefixtures('hub')

View File

@ -19,8 +19,8 @@ from kombu import Connection, Exchange, Queue
boto3 = pytest.importorskip('boto3')
from botocore.exceptions import ClientError
from kombu.transport import SQS
from kombu.transport import SQS # noqa
from botocore.exceptions import ClientError # noqa
SQS_Channel_sqs = SQS.Channel.sqs

View File

@ -5,10 +5,10 @@ from unittest.mock import patch
from kombu import messaging
from kombu import Connection, Exchange, Queue
pytest.importorskip('azure.servicebus')
from kombu.transport import azureservicebus
pytest.importorskip('azure.servicebus')
try:
# azure-servicebus version >= 0.50.0
from azure.servicebus.control_client import Message, ServiceBusService

View File

@ -1,13 +1,13 @@
import pytest
pytest.importorskip('consul')
from queue import Empty
from unittest.mock import Mock
from kombu.transport.consul import Channel, Transport
pytest.importorskip('consul')
class test_Consul:

View File

@ -1,13 +1,13 @@
import pytest
pytest.importorskip('etcd')
from queue import Empty
from unittest.mock import Mock, patch
from kombu.transport.etcd import Channel, Transport
pytest.importorskip('etcd')
class test_Etcd:

View File

@ -1,9 +1,9 @@
import pytest
pytest.importorskip('librabbitmq')
from unittest.mock import Mock, patch
pytest.importorskip('librabbitmq')
from kombu.transport import librabbitmq # noqa

View File

@ -1,14 +1,14 @@
import datetime
import pytest
pymongo = pytest.importorskip('pymongo')
from queue import Empty
from unittest.mock import MagicMock, call, patch
from kombu import Connection
pymongo = pytest.importorskip('pymongo')
def _create_mock_connection(url='', **kwargs):
from kombu.transport import mongodb # noqa

View File

@ -1,10 +1,9 @@
import pytest
from kombu import Connection
from kombu.transport import zookeeper
pytest.importorskip('kazoo')
from kombu.transport import zookeeper
class test_Channel:
def setup(self):