Commits

holger krekel committed 40797cc

add -l to changelog, lukasz to contributors and some refinements

Comments (0)

Files changed (6)

 1.4.3.dev
 -----------------
 
+- introduce -l|--listenv option to list configured environments
+  (thanks  Lukasz Balcerzak)
+
 - fix downloadcache determination to work according to docs: Only
   make pip use a download cache if PIP_DOWNLOAD_CACHE or a 
   downloadcache=PATH testenv setting is present. (The ENV setting
 Sridhar Ratnakumar
 Chris Rose
 Jannis Leidl
+Ronny Pfannschmidt
+Lukasz Balcerzak 
 
 def main():
     version = sys.version_info[:2]
-    install_requires = ['virtualenv==1.8.4', 'py>=1.4.9', ]
+    install_requires = ['virtualenv>=1.8.4', 'py>=1.4.9', ]
     if version < (2, 7) or (3, 0) <= version <= (3, 1):
         install_requires += ['argparse']
     setup(
     )
 
 if __name__ == '__main__':
-    main()
+    main()

tests/test_config.py

             [tox]
             envlist=py26,py27,py33,pypy,docs
 
+            [testenv:notincluded]
+            changedir = whatever
+
             [testenv:docs]
             changedir = docs
             ''',
         })
         result = cmd.run("tox", "-l")
-        stdout = result.stdout.str()
-        assert stdout.splitlines() == [
-            ' * py26',
-            ' * py27',
-            ' * py33',
-            ' * pypy',
-            ' * docs',
-        ]
+        result.stdout.fnmatch_lines("""
+            *py26*
+            *py27*
+            *py33*
+            *pypy*
+            *docs*
+        """)
 
     @py.test.mark.xfail("sys.version_info < (2,6)",
         reason="virtualenv3 cannot be imported")
                 raise SystemExit(1)
         if self.config.option.showconfig:
             self.showconfig()
-        elif self.config.option.list_envs:
+        elif self.config.option.listenvs:
             self.showenvs()
         else:
             return self.subcommand_test()
 
     def showenvs(self):
         for env in self.config.envlist:
-            self.report.line(" * %s" % env)
+            self.report.line("%s" % env)
 
     def info_versions(self):
         versions = ['tox-%s' % tox.__version__]
         help="increase verbosity of reporting output.")
     parser.add_argument("--showconfig", action="store_true", dest="showconfig",
         help="show configuration information. ")
+    parser.add_argument("-l", "--listenvs", action="store_true",
+        dest="listenvs", help="show list of test environments")
     parser.add_argument("-c", action="store", default="tox.ini",
         dest="configfile",
         help="use the specified config file name.")
         help="force recreation of virtual environments")
     parser.add_argument("args", nargs="*",
         help="additional arguments available to command positional substition")
-    parser.add_argument("-l", "--list", action="store_true", dest="list_envs",
-        help="show default envlist")
     return parser
 
 class Config: