summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMatus Valo <matusvalo@gmail.com>2020-08-16 22:20:19 +0200
committerAsif Saif Uddin <auvipy@gmail.com>2020-08-17 10:16:05 +0600
commit5b072fb1716b903af6542285db4b4834cb17ef28 (patch)
treebca459806d70008679966ec3179755dd43087b2f /t
parent1512c5d6091003c55d6458ce02c4562a332d460c (diff)
downloadkombu-5b072fb1716b903af6542285db4b4834cb17ef28.tar.gz
Make flake8 happy
Diffstat (limited to 't')
-rw-r--r--t/skip.py13
-rw-r--r--t/unit/asynchronous/aws/case.py1
-rw-r--r--t/unit/asynchronous/http/test_curl.py4
-rw-r--r--t/unit/transport/test_SQS.py4
-rw-r--r--t/unit/transport/test_azureservicebus.py4
-rw-r--r--t/unit/transport/test_consul.py4
-rw-r--r--t/unit/transport/test_etcd.py4
-rw-r--r--t/unit/transport/test_librabbitmq.py4
-rw-r--r--t/unit/transport/test_mongodb.py4
-rw-r--r--t/unit/transport/test_zookeeper.py3
10 files changed, 25 insertions, 20 deletions
diff --git a/t/skip.py b/t/skip.py
index 4b32c18f..487d80c8 100644
--- a/t/skip.py
+++ b/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'
+)
diff --git a/t/unit/asynchronous/aws/case.py b/t/unit/asynchronous/aws/case.py
index 42616765..56c70812 100644
--- a/t/unit/asynchronous/aws/case.py
+++ b/t/unit/asynchronous/aws/case.py
@@ -5,6 +5,7 @@ import t.skip
pytest.importorskip('boto3')
pytest.importorskip('pycurl')
+
@t.skip.if_pypy
@pytest.mark.usefixtures('hub')
class AWSCase:
diff --git a/t/unit/asynchronous/http/test_curl.py b/t/unit/asynchronous/http/test_curl.py
index 64d796ab..419de205 100644
--- a/t/unit/asynchronous/http/test_curl.py
+++ b/t/unit/asynchronous/http/test_curl.py
@@ -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')
diff --git a/t/unit/transport/test_SQS.py b/t/unit/transport/test_SQS.py
index 335b49c6..253f19af 100644
--- a/t/unit/transport/test_SQS.py
+++ b/t/unit/transport/test_SQS.py
@@ -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
diff --git a/t/unit/transport/test_azureservicebus.py b/t/unit/transport/test_azureservicebus.py
index 40a894b2..fdccaadf 100644
--- a/t/unit/transport/test_azureservicebus.py
+++ b/t/unit/transport/test_azureservicebus.py
@@ -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
diff --git a/t/unit/transport/test_consul.py b/t/unit/transport/test_consul.py
index 59b308a3..0ae02fa8 100644
--- a/t/unit/transport/test_consul.py
+++ b/t/unit/transport/test_consul.py
@@ -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:
diff --git a/t/unit/transport/test_etcd.py b/t/unit/transport/test_etcd.py
index a031a992..fb4eeec5 100644
--- a/t/unit/transport/test_etcd.py
+++ b/t/unit/transport/test_etcd.py
@@ -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:
diff --git a/t/unit/transport/test_librabbitmq.py b/t/unit/transport/test_librabbitmq.py
index ee892d11..e409c76b 100644
--- a/t/unit/transport/test_librabbitmq.py
+++ b/t/unit/transport/test_librabbitmq.py
@@ -1,9 +1,9 @@
import pytest
-pytest.importorskip('librabbitmq')
-
from unittest.mock import Mock, patch
+pytest.importorskip('librabbitmq')
+
from kombu.transport import librabbitmq # noqa
diff --git a/t/unit/transport/test_mongodb.py b/t/unit/transport/test_mongodb.py
index 89f067f0..eaba3769 100644
--- a/t/unit/transport/test_mongodb.py
+++ b/t/unit/transport/test_mongodb.py
@@ -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
diff --git a/t/unit/transport/test_zookeeper.py b/t/unit/transport/test_zookeeper.py
index 9d88b2c9..6650f03c 100644
--- a/t/unit/transport/test_zookeeper.py
+++ b/t/unit/transport/test_zookeeper.py
@@ -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):