Only require Mock on Python 3.4 and older. Use the builtin one elsewhere.

Mock 2.0 is using pbr which is hostile to environments without network access.
It's not required on Python 3.5+ so I made it possible to use `unittest.mock`
on this version.

Updated tox.ini to reflect this. Tested with 2.7.11, 3.3.6, 3.4.5, and 3.5.2 on
macOS 10.12.1 with tox and pyenv.
This commit is contained in:
Lukasz Langa 2016-11-27 13:26:42 -08:00
parent b8ce1334d0
commit 01c0c648e1
21 changed files with 95 additions and 31 deletions

View file

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