aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/files.py5
-rw-r--r--setuptools/tests/test_build_ext.py2
-rw-r--r--setuptools/tests/test_easy_install.py23
-rw-r--r--setuptools/tests/test_manifest.py3
4 files changed, 10 insertions, 23 deletions
diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py
index bad2189d..71194b9d 100644
--- a/setuptools/tests/files.py
+++ b/setuptools/tests/files.py
@@ -1,9 +1,6 @@
import os
-import pkg_resources.py31compat
-
-
def build_files(file_defs, prefix=""):
"""
Build a set of files/directories, as described by the
@@ -30,7 +27,7 @@ def build_files(file_defs, prefix=""):
for name, contents in file_defs.items():
full_name = os.path.join(prefix, name)
if isinstance(contents, dict):
- pkg_resources.py31compat.makedirs(full_name, exist_ok=True)
+ os.makedirs(full_name, exist_ok=True)
build_files(contents, prefix=full_name)
else:
if isinstance(contents, bytes):
diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py
index 3dc87ca3..2ef8521d 100644
--- a/setuptools/tests/test_build_ext.py
+++ b/setuptools/tests/test_build_ext.py
@@ -42,7 +42,7 @@ class TestBuildExt:
res = cmd.get_ext_filename('spam.eggs')
if six.PY2 or not get_abi3_suffix():
- assert res.endswith(get_config_var('SO'))
+ assert res.endswith(get_config_var('EXT_SUFFIX'))
elif sys.platform == 'win32':
assert res.endswith('eggs.pyd')
else:
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index e8ebd320..c07b5bea 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -16,6 +16,7 @@ import io
import zipfile
import mock
import time
+import re
from setuptools.extern import six
@@ -63,25 +64,15 @@ SETUP_PY = DALS("""
class TestEasyInstallTest:
def test_get_script_args(self):
header = ei.CommandSpec.best().from_environment().as_header()
- expected = header + DALS(r"""
- # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
- __requires__ = 'spec'
- import re
- import sys
- from pkg_resources import load_entry_point
-
- if __name__ == '__main__':
- sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
- sys.exit(
- load_entry_point('spec', 'console_scripts', 'name')()
- )
- """) # noqa: E501
dist = FakeDist()
-
args = next(ei.ScriptWriter.get_args(dist))
name, script = itertools.islice(args, 2)
-
- assert script == expected
+ assert script.startswith(header)
+ assert "'spec'" in script
+ assert "'console_scripts'" in script
+ assert "'name'" in script
+ assert re.search(
+ '^# EASY-INSTALL-ENTRY-SCRIPT', script, flags=re.MULTILINE)
def test_no_find_links(self):
# new option '--no-find-links', that blocks find-links added at
diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py
index 2a0e9c86..042a8b17 100644
--- a/setuptools/tests/test_manifest.py
+++ b/setuptools/tests/test_manifest.py
@@ -10,7 +10,6 @@ import itertools
from distutils import log
from distutils.errors import DistutilsTemplateError
-import pkg_resources.py31compat
from setuptools.command.egg_info import FileList, egg_info, translate_pattern
from setuptools.dist import Distribution
from setuptools.extern import six
@@ -364,7 +363,7 @@ class TestFileListTest(TempDirTestCase):
for file in files:
file = os.path.join(self.temp_dir, file)
dirname, basename = os.path.split(file)
- pkg_resources.py31compat.makedirs(dirname, exist_ok=True)
+ os.makedirs(dirname, exist_ok=True)
open(file, 'w').close()
def test_process_template_line(self):