mirror of https://github.com/celery/kombu.git
Make flake8 happy
This commit is contained in:
parent
1512c5d609
commit
5b072fb171
13
t/skip.py
13
t/skip.py
|
@ -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'
|
||||
)
|
||||
|
|
|
@ -5,6 +5,7 @@ import t.skip
|
|||
pytest.importorskip('boto3')
|
||||
pytest.importorskip('pycurl')
|
||||
|
||||
|
||||
@t.skip.if_pypy
|
||||
@pytest.mark.usefixtures('hub')
|
||||
class AWSCase:
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import pytest
|
||||
|
||||
pytest.importorskip('librabbitmq')
|
||||
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
pytest.importorskip('librabbitmq')
|
||||
|
||||
from kombu.transport import librabbitmq # noqa
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue