aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-04 22:44:28 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-04 22:44:28 -0500
commit3b68368e30aa51d4a7f96053501c604a8cb6fe42 (patch)
treeff5caaac51c0c401bb7490899ad07068fec1730d /setuptools/tests/test_easy_install.py
parent0ad48553589fc68faeb7a5fc2f76da128249ac86 (diff)
downloadexternal_python_setuptools-3b68368e30aa51d4a7f96053501c604a8cb6fe42.tar.gz
external_python_setuptools-3b68368e30aa51d4a7f96053501c604a8cb6fe42.tar.bz2
external_python_setuptools-3b68368e30aa51d4a7f96053501c604a8cb6fe42.zip
Change the way string values are interpreted from build.executable - now they must be quoted or otherwise escaped suitable for parsing by shlex.split.
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
-rw-r--r--setuptools/tests/test_easy_install.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index e1f06788..a3d5b0a9 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -505,3 +505,12 @@ class TestCommandSpec:
cmd = CommandSpec.from_environment()
assert len(cmd) == 1
assert cmd.as_header().startswith('#!"')
+
+ def test_from_simple_string_uses_shlex(self):
+ """
+ In order to support `executable = /usr/bin/env my-python`, make sure
+ from_param invokes shlex on that input.
+ """
+ cmd = CommandSpec.from_param('/usr/bin/env my-python')
+ assert len(cmd) == 2
+ assert '"' not in cmd.as_header()