summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_easy_install.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
-rw-r--r--setuptools/tests/test_easy_install.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 58108db6..9aa2bd63 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -71,9 +71,7 @@ class TestEasyInstallTest:
def test_get_script_args(self):
header = ei.CommandSpec.best().from_environment().as_header()
- try:
- from importlib.metadata import distribution # noqa: F401
-
+ if sys.version_info >= (3, 8):
expected = header + DALS(r"""
# EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
__requires__ = 'spec'
@@ -87,7 +85,7 @@ class TestEasyInstallTest:
if entry_point.group == 'console_scripts' and entry_point.name == 'name':
sys.exit(entry_point.load()())
""") # noqa: E501
- except ImportError:
+ else:
expected = header + DALS(r"""
# EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
__requires__ = 'spec'