From f5ee7d01be768b0138fbb28034d5690061aa1695 Mon Sep 17 00:00:00 2001 From: vrde Date: Fri, 27 Apr 2018 00:09:28 +0200 Subject: Add compatibility for Python 2.7 --- requirements.test.txt | 3 ++- tests/test_pycco.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/requirements.test.txt b/requirements.test.txt index 5db5948..6c8b8e3 100644 --- a/requirements.test.txt +++ b/requirements.test.txt @@ -1,3 +1,4 @@ hypothesis==1.18.1 -pytest-cov==2.2.0 +pytest-cov~=2.0 coveralls==1.1 +mock~=2.0 diff --git a/tests/test_pycco.py b/tests/test_pycco.py index 1be2683..cae1888 100644 --- a/tests/test_pycco.py +++ b/tests/test_pycco.py @@ -4,7 +4,10 @@ import tempfile import time import os.path import pytest -from unittest.mock import patch +try: + from unittest.mock import patch +except ImportError: + from mock import patch from hypothesis import given, example, assume from hypothesis.strategies import lists, text, booleans, choices, none -- cgit v1.2.1