holger krekel avatar holger krekel committed ca1c1d8

a command line specified --installpkg trumps any develop option

Comments (0)

Files changed (3)

 - rework and simplify "commands" parsing and in particular posargs
   substitutions to avoid various win32/posix related quoting issues.
 
+- make sure that the --installpkg option trumps any usedevelop settings
+  in tox.ini or
+
 1.6.1
 -----
 

tests/test_config.py

         assert argvlist[0] == ["cmd1"]
         assert argvlist[1] == ["cmd2", "value2", "other"]
 
-    def test_positional_arguments_are_only_replaced_when_standing_alone(self, tmpdir, newconfig):
+    def test_positional_arguments_are_only_replaced_when_standing_alone(self,
+        tmpdir, newconfig):
         config = newconfig("""
             [section]
             key=
         assert envconfig.envlogdir == envconfig.envdir.join("log")
         assert envconfig.setenv is None
 
+    def test_installpkg_tops_develop(self, newconfig):
+        config = newconfig(["--installpkg=abc"], """
+            [testenv]
+            usedevelop = True
+        """)
+        assert not config.envconfigs["python"].develop
+
     def test_specific_command_overrides(self, tmpdir, newconfig):
         config = newconfig("""
             [testenv]
         vc.config = config
         reader = IniReader(self._cfg, fallbacksections=["testenv"])
         reader.addsubstitutions(**subs)
-        vc.develop = reader.getbool(section, "usedevelop", config.option.develop)
+        vc.develop = not config.option.installpkg and \
+               reader.getbool(section, "usedevelop", config.option.develop)
         vc.envdir = reader.getpath(section, "envdir", "{toxworkdir}/%s" % name)
         vc.args_are_paths = reader.getbool(section, "args_are_paths", True)
         if reader.getdefault(section, "python", None):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.