@@ -1980,6 +1980,11 @@ def test_listenvs(self, cmd, initproj):
1980
1980
'tox.ini' : '''
1981
1981
[tox]
1982
1982
envlist=py26,py27,py33,pypy,docs
1983
+ description= py27: run py.test on Python 2.7
1984
+ py33: run py.test on Python 3.6
1985
+ pypy: publish to pypy
1986
+ docs: document stuff
1987
+ notincluded: random extra
1983
1988
1984
1989
[testenv:notincluded]
1985
1990
changedir = whatever
@@ -1990,15 +1995,69 @@ def test_listenvs(self, cmd, initproj):
1990
1995
})
1991
1996
result = cmd .run ("tox" , "-l" )
1992
1997
result .stdout .fnmatch_lines ("""
1993
- * py26*
1994
- * py27*
1995
- * py33*
1996
- * pypy*
1997
- * docs*
1998
+ py26
1999
+ py27
2000
+ py33
2001
+ pypy
2002
+ docs
1998
2003
""" )
1999
2004
2000
- def test_listenvs_description (self , cmd , initproj ):
2001
- initproj ('listenvs' , filedefs = {
2005
+ def test_listenvs_verbose_description (self , cmd , initproj ):
2006
+ initproj ('listenvs_verbose_description' , filedefs = {
2007
+ 'tox.ini' : '''
2008
+ [tox]
2009
+ envlist=py26,py27,py33,pypy,docs
2010
+ [testenv]
2011
+ description= py26: run py.test on Python 2.6
2012
+ py27: run py.test on Python 2.7
2013
+ py33: run py.test on Python 3.3
2014
+ pypy: publish to pypy
2015
+ docs: document stuff
2016
+ notincluded: random extra
2017
+
2018
+ [testenv:notincluded]
2019
+ changedir = whatever
2020
+
2021
+ [testenv:docs]
2022
+ changedir = docs
2023
+ description = let me overwrite that
2024
+ ''' ,
2025
+ })
2026
+ result = cmd .run ("tox" , "-lv" )
2027
+ result .stdout .fnmatch_lines ("""
2028
+ default environments:
2029
+ py26 -> run py.test on Python 2.6
2030
+ py27 -> run py.test on Python 2.7
2031
+ py33 -> run py.test on Python 3.3
2032
+ pypy -> publish to pypy
2033
+ docs -> let me overwrite that
2034
+ """ )
2035
+
2036
+ def test_listenvs_all (self , cmd , initproj ):
2037
+ initproj ('listenvs_all' , filedefs = {
2038
+ 'tox.ini' : '''
2039
+ [tox]
2040
+ envlist=py26,py27,py33,pypy,docs
2041
+
2042
+ [testenv:notincluded]
2043
+ changedir = whatever
2044
+
2045
+ [testenv:docs]
2046
+ changedir = docs
2047
+ ''' ,
2048
+ })
2049
+ result = cmd .run ("tox" , "-a" )
2050
+ result .stdout .fnmatch_lines ("""
2051
+ py26
2052
+ py27
2053
+ py33
2054
+ pypy
2055
+ docs
2056
+ notincluded
2057
+ """ )
2058
+
2059
+ def test_listenvs_all_verbose_description (self , cmd , initproj ):
2060
+ initproj ('listenvs_all_verbose_description' , filedefs = {
2002
2061
'tox.ini' : '''
2003
2062
[tox]
2004
2063
envlist={py27,py36}-{windows,linux}
@@ -2014,12 +2073,16 @@ def test_listenvs_description(self, cmd, initproj):
2014
2073
changedir = docs
2015
2074
''' ,
2016
2075
})
2017
- result = cmd .run ("tox" , "-l " )
2076
+ result = cmd .run ("tox" , "-av " )
2018
2077
result .stdout .fnmatch_lines ("""
2019
- py27-windows run py.test on Python 2.7 on Windows platform
2020
- py27-linux run py.test on Python 2.7 on Linux platform
2021
- py36-windows run py.test on Python 3.6 on Windows platform
2022
- py36-linux run py.test on Python 3.6 on Linux platform
2078
+ default environments:
2079
+ py27-windows -> run py.test on Python 2.7 on Windows platform
2080
+ py27-linux -> run py.test on Python 2.7 on Linux platform
2081
+ py36-windows -> run py.test on Python 3.6 on Windows platform
2082
+ py36-linux -> run py.test on Python 3.6 on Linux platform
2083
+
2084
+ additional environments:
2085
+ docs -> generate documentation
2023
2086
""" )
2024
2087
2025
2088
def test_config_specific_ini (self , tmpdir , cmd ):
0 commit comments