summaryrefslogtreecommitdiff
path: root/pkg_resources/tests/test_pkg_resources.py
diff options
context:
space:
mode:
authorMiro Hrončok <miro@hroncok.cz>2022-10-17 14:03:14 +0200
committerMiro Hrončok <miro@hroncok.cz>2022-10-17 14:12:46 +0200
commitc4b556166f9371d0cbc24d50dab83325aac77a3e (patch)
tree3264a1d0e8b38074e19fda97f7223bbd345ed9e6 /pkg_resources/tests/test_pkg_resources.py
parentf07a248e1e58a76eac5069d8c07bdf81e981587d (diff)
downloadpython-setuptools-git-c4b556166f9371d0cbc24d50dab83325aac77a3e.tar.gz
Consistently use unittest.mock in tests
- Some tests used unittest.mock from the standard library - Some tests used mock from PyPI - Some tests tried to import unittest.mock with a fallback to mock (the import never fails on Python 3.7+, older Pythons are not supported)
Diffstat (limited to 'pkg_resources/tests/test_pkg_resources.py')
-rw-r--r--pkg_resources/tests/test_pkg_resources.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py
index 6518820e..684c9777 100644
--- a/pkg_resources/tests/test_pkg_resources.py
+++ b/pkg_resources/tests/test_pkg_resources.py
@@ -9,10 +9,7 @@ import stat
import distutils.dist
import distutils.command.install_egg_info
-try:
- from unittest import mock
-except ImportError:
- import mock
+from unittest import mock
from pkg_resources import (
DistInfoDistribution, Distribution, EggInfoDistribution,