Make flake8 use built-in mock from unittest, if available (Python 3.4+)

This commit is contained in:
Kurt Mosiejczuk 2019-09-13 16:19:22 -04:00
parent 121ea4f056
commit 5faa1df46a
21 changed files with 84 additions and 21 deletions

View file

@ -1,5 +1,8 @@
"""Integration tests for the checker submodule."""
import mock
try:
from unittest import mock
except (ImportError, AttributeError):
import mock
import pytest
from flake8 import checker

View file

@ -2,7 +2,10 @@
import json
import os
import mock
try:
from unittest import mock
except (ImportError, AttributeError):
import mock
import pytest
from flake8 import utils