mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-07-22 11:54:34 +02:00
Remove unnecessary test imports. (#150)
This commit is contained in:
parent
622680fe3f
commit
1dfa79c5ef
10 changed files with 5 additions and 25 deletions
|
@ -13,7 +13,7 @@ __metaclass__ = type
|
|||
# One unittest needs to import builtins via __import__() so we need to have
|
||||
# the string that represents it
|
||||
try:
|
||||
import __builtin__
|
||||
import __builtin__ # noqa: F401, pylint: disable=unused-import
|
||||
except ImportError:
|
||||
BUILTINS = 'builtins'
|
||||
else:
|
||||
|
|
|
@ -20,12 +20,12 @@ try:
|
|||
# Allow wildcard import because we really do want to import all of mock's
|
||||
# symbols into this compat shim
|
||||
# pylint: disable=wildcard-import,unused-wildcard-import
|
||||
from unittest.mock import *
|
||||
from unittest.mock import * # noqa: F401, pylint: disable=unused-import
|
||||
except ImportError:
|
||||
# Python 2
|
||||
# pylint: disable=wildcard-import,unused-wildcard-import
|
||||
try:
|
||||
from mock import *
|
||||
from mock import * # noqa: F401, pylint: disable=unused-import
|
||||
except ImportError:
|
||||
print('You need the mock library installed on python2.x to run tests')
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ import sys
|
|||
if sys.version_info < (2, 7):
|
||||
try:
|
||||
# Need unittest2 on python2.6
|
||||
from unittest2 import *
|
||||
from unittest2 import * # noqa: F401, pylint: disable=unused-import
|
||||
except ImportError:
|
||||
print('You need unittest2 installed on python2.6.x to run tests')
|
||||
else:
|
||||
from unittest import *
|
||||
from unittest import * # noqa: F401, pylint: disable=unused-import
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue