summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Scherfke <stefan@sofa-rockers.org>2014-06-25 09:41:37 +0200
committerStefan Scherfke <stefan@sofa-rockers.org>2014-06-25 09:41:37 +0200
commit2b04e91cfc046b67ee5d2fc3b32357022b6cde37 (patch)
treef6ac4b83d8c44c6cf6392e2f2c874e5879f5a73d
parentbfb9423685f02a98801981a60720e21dce694b67 (diff)
downloadtox-2b04e91cfc046b67ee5d2fc3b32357022b6cde37.tar.gz
Add support for PyPy3 (env "pypy3").
-rw-r--r--tests/test_config.py8
-rw-r--r--tox/_config.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index ff743c4..bc5a683 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -554,7 +554,7 @@ class TestConfigTestEnv:
envconfig = config.envconfigs['python']
assert envconfig.envpython == envconfig.envbindir.join("python")
- @pytest.mark.parametrize("bp", ["jython", "pypy"])
+ @pytest.mark.parametrize("bp", ["jython", "pypy", "pypy3"])
def test_envbindir_jython(self, tmpdir, newconfig, bp):
config = newconfig("""
[testenv]
@@ -916,7 +916,7 @@ class TestGlobalOptions:
assert str(env.basepython) == sys.executable
def test_default_environments(self, tmpdir, newconfig, monkeypatch):
- envs = "py26,py27,py31,py32,py33,jython,pypy"
+ envs = "py26,py27,py31,py32,py33,py34,jython,pypy,pypy3"
inisource = """
[tox]
envlist = %s
@@ -928,8 +928,8 @@ class TestGlobalOptions:
env = config.envconfigs[name]
if name == "jython":
assert env.basepython == "jython"
- elif name == "pypy":
- assert env.basepython == "pypy"
+ elif name.startswith("pypy"):
+ assert env.basepython == name
else:
assert name.startswith("py")
bp = "python%s.%s" %(name[2], name[3])
diff --git a/tox/_config.py b/tox/_config.py
index 4f89d00..1495bd8 100644
--- a/tox/_config.py
+++ b/tox/_config.py
@@ -15,7 +15,7 @@ import tox
iswin32 = sys.platform == "win32"
-defaultenvs = {'jython': 'jython', 'pypy': 'pypy'}
+defaultenvs = {'jython': 'jython', 'pypy': 'pypy', 'pypy3': 'pypy3'}
for _name in "py,py24,py25,py26,py27,py30,py31,py32,py33,py34".split(","):
if _name == "py":
basepython = sys.executable