From 90e95f2367a2325dbf29e5a7a92ef483806ae7b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 30 Jan 2017 14:30:55 -0500 Subject: Rely on backports.unittest_mock plugin to make mock available on old Python versions. Ref #949. --- setuptools/tests/test_easy_install.py | 5 +---- setuptools/tests/test_msvc.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'setuptools/tests') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index f5c932da..b75e6ff2 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -14,15 +14,12 @@ import itertools import distutils.errors import io import zipfile +from unittest import mock import time from six.moves import urllib import pytest -try: - from unittest import mock -except ImportError: - import mock from setuptools import sandbox from setuptools.sandbox import run_setup diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index a0c76ea0..fbeed1d5 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -5,12 +5,9 @@ Tests for msvc support module. import os import contextlib import distutils.errors +from unittest import mock import pytest -try: - from unittest import mock -except ImportError: - import mock from . import contexts -- cgit v1.2.3