summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorJintao Zhang <zhangjintao9020@gmail.com>2018-10-23 11:52:48 +0800
committerJintao Zhang <zhangjintao9020@gmail.com>2018-10-23 11:52:48 +0800
commit5188a146c2d8ea0c0a80fd5dbdbaef6f43741083 (patch)
tree6e43d3301481b38a2c665298ac8fb9d40cda8b07 /tests/unit
parent7801a17adc566af818e4da2ea75c7a28974b745c (diff)
downloadflake8-5188a146c2d8ea0c0a80fd5dbdbaef6f43741083.tar.gz
Fix collections ABCs deprecation warning.
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test_plugin_type_manager.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/unit/test_plugin_type_manager.py b/tests/unit/test_plugin_type_manager.py
index 388cd8d..18058d4 100644
--- a/tests/unit/test_plugin_type_manager.py
+++ b/tests/unit/test_plugin_type_manager.py
@@ -1,5 +1,5 @@
"""Tests for flake8.plugins.manager.PluginTypeManager."""
-import collections
+import sys
import mock
import pytest
@@ -7,6 +7,11 @@ import pytest
from flake8 import exceptions
from flake8.plugins import manager
+if sys.version_info >= (3, 3):
+ import collections.abc as collections_abc
+else:
+ import collections as collections_abc
+
TEST_NAMESPACE = "testing.plugin-type-manager"
@@ -86,7 +91,7 @@ def test_generate_call_function():
'method_name', optmanager,
)
- assert isinstance(func, collections.Callable)
+ assert isinstance(func, collections_abc.Callable)
assert func(plugin) is optmanager