mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 21:16:54 +00:00
Use unittest.mock if available
Use unittest.mock https://docs.python.org/3/library/unitetst.mock.html starting from >= Python 3.3
This commit is contained in:
parent
02b955453e
commit
c3d7e68a2b
2 changed files with 17 additions and 2 deletions
|
|
@ -1,7 +1,10 @@
|
|||
from __future__ import with_statement
|
||||
|
||||
import unittest
|
||||
import mock
|
||||
try:
|
||||
from unittest import mock
|
||||
except ImportError:
|
||||
import mock # < PY33
|
||||
|
||||
from flake8 import engine, util, __version__
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue