From 53e5575e11a35aaf761da56aa6728cdcd7c04ec0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 08:38:56 -0500 Subject: When invoking rmtree, ensure the parameter is unicode to avoid errors when the tree contains Unicode filenames. Fixes #704. --- setuptools/tests/test_easy_install.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'setuptools/tests/test_easy_install.py') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 209e6b78..08138efc 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -169,10 +169,8 @@ 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") + @pytest.mark.xfail(setuptools.tests.is_ascii, + reason="https://github.com/pypa/setuptools/issues/706") def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if -- cgit v1.2.3 From 5ad13718686bee04a93b4e86929c1bb170f14a52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 21 Dec 2016 14:15:37 -0500 Subject: Cast the value to rmtree to bytes on Linux and Python 2 when the filesystemencoding is ascii, and let posixpath work its voodoo. Fixes #706. --- setuptools/tests/test_easy_install.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'setuptools/tests/test_easy_install.py') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 08138efc..1ea33b08 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -169,8 +169,6 @@ class TestEasyInstallTest: sdist_zip.close() return str(sdist) - @pytest.mark.xfail(setuptools.tests.is_ascii, - reason="https://github.com/pypa/setuptools/issues/706") def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if -- cgit v1.2.3 From ff371f18f0076bc63da05334f7e551c1cc29e10d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jan 2017 22:34:28 -0500 Subject: Strip out vendored packages and require them instead. Ref #581. --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/tests/test_easy_install.py') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 1ea33b08..f5c932da 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -16,7 +16,7 @@ import io import zipfile import time -from setuptools.extern.six.moves import urllib +from six.moves import urllib import pytest try: -- cgit v1.2.3 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 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'setuptools/tests/test_easy_install.py') 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 -- cgit v1.2.3 From 3d0cc355fb5e8012cb8c72f0e25042a5a44f31d6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Feb 2017 11:49:51 -0500 Subject: Revert "Merge pull request #933 from pypa/feature/581-depend-not-bundle" This reverts commit 089cdeb489a0fa94d11b7307b54210ef9aa40511, reversing changes made to aaec654d804cb78dbb6391afff721a63f26a71cd. --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/tests/test_easy_install.py') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b75e6ff2..52db16f6 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -17,7 +17,7 @@ import zipfile from unittest import mock import time -from six.moves import urllib +from setuptools.extern.six.moves import urllib import pytest -- cgit v1.2.3 From e753cb42481783ac858ceb518aaac1472075063c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 24 Feb 2017 10:55:44 +0200 Subject: Python 3.6 invalid escape sequence deprecation fixes --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/tests/test_easy_install.py') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b75e6ff2..fd8300a0 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -65,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 -- cgit v1.2.3 From 462610859692843e3bb6162befe978f14244eada Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 15 Jun 2017 10:03:16 +0200 Subject: tests: mark test_unicode_filename_in_sdist with fail_on_ascii --- setuptools/tests/test_easy_install.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'setuptools/tests/test_easy_install.py') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 2d9682a9..1b7178a1 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -30,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 .py26compat import tarfile_open @@ -166,6 +167,7 @@ class TestEasyInstallTest: sdist_zip.close() return str(sdist) + @fail_on_ascii def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if -- cgit v1.2.3 From bf20d881df662da30d94687efb2ff3d3ba32f55a Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 14 Jul 2017 08:49:23 +0200 Subject: tests: switch back to mock instead of backports.unittest_mock --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/tests/test_easy_install.py') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 1b7178a1..26cdd90d 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -14,7 +14,7 @@ import itertools import distutils.errors import io import zipfile -from unittest import mock +import mock import time from setuptools.extern.six.moves import urllib -- cgit v1.2.3 From 0c86c6a290c6ddce7732228820482a600f7520ca Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 26 Jul 2017 19:51:24 +0200 Subject: tests: minor cleanup; remove dead code --- setuptools/tests/test_easy_install.py | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'setuptools/tests/test_easy_install.py') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 26cdd90d..c9d396f4 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -567,18 +567,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" -- cgit v1.2.3