@@ -1817,12 +1817,16 @@ def test_correct_basepython_chosen_from_default_factors(self, newconfig):
1817
1817
basepython = config .envconfigs [name ].basepython
1818
1818
if name == "jython" :
1819
1819
assert basepython == "jython"
1820
- elif name . startswith ( "pypy " ):
1821
- assert basepython == name
1820
+ elif name in ( "pypy2" , "pypy3 " ):
1821
+ assert basepython == "pypy" + name [ - 1 ]
1822
1822
elif name in ("py2" , "py3" ):
1823
1823
assert basepython == "python" + name [- 1 ]
1824
+ elif name == "pypy" :
1825
+ assert basepython == name
1824
1826
elif name == "py" :
1825
1827
assert "python" in basepython or "pypy" in basepython
1828
+ elif "pypy" in name :
1829
+ assert basepython == "pypy{}.{}" .format (name [- 2 ], name [- 1 ])
1826
1830
else :
1827
1831
assert name .startswith ("py" )
1828
1832
assert basepython == "python{}.{}" .format (name [2 ], name [3 ])
@@ -2341,10 +2345,10 @@ def test_listenvs(self, cmd, initproj):
2341
2345
filedefs = {
2342
2346
"tox.ini" : """
2343
2347
[tox]
2344
- envlist=py36,py27,py34,pypy ,docs
2348
+ envlist=py36,py27,py34,pypi ,docs
2345
2349
description= py27: run pytest on Python 2.7
2346
2350
py34: run pytest on Python 3.6
2347
- pypy : publish to pypy
2351
+ pypi : publish to PyPI
2348
2352
docs: document stuff
2349
2353
notincluded: random extra
2350
2354
@@ -2357,20 +2361,20 @@ def test_listenvs(self, cmd, initproj):
2357
2361
},
2358
2362
)
2359
2363
result = cmd ("-l" )
2360
- assert result .outlines == ["py36" , "py27" , "py34" , "pypy " , "docs" ]
2364
+ assert result .outlines == ["py36" , "py27" , "py34" , "pypi " , "docs" ]
2361
2365
2362
2366
def test_listenvs_verbose_description (self , cmd , initproj ):
2363
2367
initproj (
2364
2368
"listenvs_verbose_description" ,
2365
2369
filedefs = {
2366
2370
"tox.ini" : """
2367
2371
[tox]
2368
- envlist=py36,py27,py34,pypy ,docs
2372
+ envlist=py36,py27,py34,pypi ,docs
2369
2373
[testenv]
2370
2374
description= py36: run pytest on Python 3.6
2371
2375
py27: run pytest on Python 2.7
2372
2376
py34: run pytest on Python 3.4
2373
- pypy : publish to pypy
2377
+ pypi : publish to PyPI
2374
2378
docs: document stuff
2375
2379
notincluded: random extra
2376
2380
@@ -2389,7 +2393,7 @@ def test_listenvs_verbose_description(self, cmd, initproj):
2389
2393
"py36 -> run pytest on Python 3.6" ,
2390
2394
"py27 -> run pytest on Python 2.7" ,
2391
2395
"py34 -> run pytest on Python 3.4" ,
2392
- "pypy -> publish to pypy " ,
2396
+ "pypi -> publish to PyPI " ,
2393
2397
"docs -> let me overwrite that" ,
2394
2398
]
2395
2399
assert result .outlines [2 :] == expected
@@ -2400,7 +2404,7 @@ def test_listenvs_all(self, cmd, initproj):
2400
2404
filedefs = {
2401
2405
"tox.ini" : """
2402
2406
[tox]
2403
- envlist=py36,py27,py34,pypy ,docs
2407
+ envlist=py36,py27,py34,pypi ,docs
2404
2408
2405
2409
[testenv:notincluded]
2406
2410
changedir = whatever
@@ -2411,7 +2415,7 @@ def test_listenvs_all(self, cmd, initproj):
2411
2415
},
2412
2416
)
2413
2417
result = cmd ("-a" )
2414
- expected = ["py36" , "py27" , "py34" , "pypy " , "docs" , "notincluded" ]
2418
+ expected = ["py36" , "py27" , "py34" , "pypi " , "docs" , "notincluded" ]
2415
2419
assert result .outlines == expected
2416
2420
2417
2421
def test_listenvs_all_verbose_description (self , cmd , initproj ):
0 commit comments