Commits

Carl Meyer committed 209de3d

Config parser shlex-splits install_deps_command.

Comments (0)

Files changed (2)

tests/test_config.py

             install_deps_command=pip install --pre {deps}
         """)
         envconfig = config.envconfigs['python']
-        assert envconfig.install_deps_command == "pip install --pre {deps}"
+        assert envconfig.install_deps_argv == [
+            'pip', 'install', '--pre', '{deps}']
 
     def test_simple(tmpdir, newconfig):
         config = newconfig("""
             downloadcache = reader.getdefault(section, "downloadcache")
         if downloadcache:
             vc.downloadcache = py.path.local(downloadcache)
-        vc.install_deps_command = reader.getdefault(
+        vc.install_deps_argv = reader.getargv(
             section, "install_deps_command", "pip @@@", replace=False)
         return vc
 
 
         return shlex.split(new_command.strip())
 
+    def getargv(self, section, name, default=None, replace=True):
+        command = self.getdefault(
+            section, name, default=default, replace=replace)
+
+        return shlex.split(command.strip())
+
     def getbool(self, section, name, default=None):
         s = self.getdefault(section, name, default)
         if s is None: