diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2017-09-03 19:57:54 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-09-03 20:01:45 -0400 |
| commit | dcb24ad15465c266a3f258471766fbbe8fc8a42e (patch) | |
| tree | 13123440610d78e398476a8ce1e8cc3d9f9ec72e /setuptools/tests/test_easy_install.py | |
| parent | f14930e66601b462699c44384c482cd966f53b8f (diff) | |
| parent | 1b192005562d5cf0de30c02154c58fd1dca577c8 (diff) | |
| download | external_python_setuptools-dcb24ad15465c266a3f258471766fbbe8fc8a42e.tar.gz external_python_setuptools-dcb24ad15465c266a3f258471766fbbe8fc8a42e.tar.bz2 external_python_setuptools-dcb24ad15465c266a3f258471766fbbe8fc8a42e.zip | |
Merge branch 'master' into drop-py26
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
| -rw-r--r-- | setuptools/tests/test_easy_install.py | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 6f9bc8e1..e4ed556f 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 +import mock import time from setuptools.extern.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 @@ -33,6 +30,7 @@ from setuptools.dist import Distribution from pkg_resources import normalize_path, working_set from pkg_resources import Distribution as PRDistribution import setuptools.tests.server +from setuptools.tests import fail_on_ascii import pkg_resources from . import contexts @@ -67,7 +65,7 @@ class TestEasyInstallTest: def test_get_script_args(self): header = ei.CommandSpec.best().from_environment().as_header() - expected = header + DALS(""" + expected = header + DALS(r""" # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' __requires__ = 'spec' import re @@ -168,10 +166,7 @@ class TestEasyInstallTest: sdist_zip.close() return str(sdist) - @pytest.mark.xfail(reason="#709 and #710") - # also - #@pytest.mark.xfail(setuptools.tests.is_ascii, - # reason="https://github.com/pypa/setuptools/issues/706") + @fail_on_ascii def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if @@ -571,18 +566,6 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', return test_pkg -def make_trivial_sdist(dist_path, setup_py): - """Create a simple sdist tarball at dist_path, containing just a - setup.py, the contents of which are provided by the setup_py string. - """ - - setup_py_file = tarfile.TarInfo(name='setup.py') - setup_py_bytes = io.BytesIO(setup_py.encode('utf-8')) - setup_py_file.size = len(setup_py_bytes.getvalue()) - with tarfile.open(dist_path, 'w:gz') as dist: - dist.addfile(setup_py_file, fileobj=setup_py_bytes) - - @pytest.mark.skipif( sys.platform.startswith('java') and ei.is_sh(sys.executable), reason="Test cannot run under java when executable is sh" |
