diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-04-05 12:58:14 +0200 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-04-05 12:58:14 +0200 |
| commit | f27045fdac77ce80221a1526339a6c33139439c5 (patch) | |
| tree | 1340a464ec69b450a1dcc27e4bdf82db629770df | |
| parent | f3e4bfd2a8551f48dbceeea17c48bbd64c9e2d9c (diff) | |
| download | tox-f27045fdac77ce80221a1526339a6c33139439c5.tar.gz | |
Updated tests to not expect virtualenv3/5 anymore.
| -rw-r--r-- | tests/test_venv.py | 9 | ||||
| -rw-r--r-- | tox/_cmdline.py | 9 | ||||
| -rw-r--r-- | tox/_venv.py | 10 |
3 files changed, 8 insertions, 20 deletions
diff --git a/tests/test_venv.py b/tests/test_venv.py index a05a5f3..953e220 100644 --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -45,11 +45,6 @@ def test_getsupportedinterpreter(monkeypatch, newconfig, mocksession): interp = venv.getsupportedinterpreter() assert interp == sys.executable monkeypatch.setattr(sys, 'platform', "win32") - monkeypatch.setattr(venv.envconfig, 'basepython', 'python3') - py.test.raises(tox.exception.UnsupportedInterpreter, - venv.getsupportedinterpreter) - monkeypatch.undo() - monkeypatch.setattr(sys, 'platform', "win32") monkeypatch.setattr(venv.envconfig, 'basepython', 'jython') py.test.raises(tox.exception.UnsupportedInterpreter, venv.getsupportedinterpreter) @@ -226,12 +221,12 @@ def test_install_python3(tmpdir, newmocksession): l = mocksession._pcalls assert len(l) == 1 args = l[0].args - assert 'virtualenv5' in args[0] + assert 'virtualenv' in args[0] l[:] = [] venv._install(["hello"]) assert len(l) == 1 args = l[0].args - assert 'easy_install' in str(args[0]) + assert 'pip' in str(args[0]) for x in args: assert "--download-cache" not in args, args diff --git a/tox/_cmdline.py b/tox/_cmdline.py index 9f42db6..8a166e5 100644 --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -1,8 +1,8 @@ """ Automatically package and test a Python project against configurable Python2 and Python3 based virtual environments. Environments are -setup by using virtualenv and virtualenv5 respectively. Configuration -is generally done through an INI-style "tox.ini" file. +setup by using virtualenv. Configuration is generally done through an +INI-style "tox.ini" file. """ import tox import py @@ -247,9 +247,8 @@ class Session: def info_versions(self): versions = ['tox-%s' % tox.__version__] - for tool in ('virtualenv', 'virtualenv5'): - version = py.process.cmdexec("%s --version" % tool) - versions.append("%s-%s" %(tool, version.strip())) + version = py.process.cmdexec("virtualenv --version") + versions.append("virtualenv-%s" % version.strip()) self.report.keyvalue("tool-versions:", " ".join(versions)) def pcall(self, args, log=None, cwd=None, env=None): diff --git a/tox/_venv.py b/tox/_venv.py index b2677f4..fa0cbf9 100644 --- a/tox/_venv.py +++ b/tox/_venv.py @@ -138,9 +138,6 @@ class VirtualEnv(object): return x def getsupportedinterpreter(self): - if sys.platform == "win32" and self._ispython3(): - raise tox.exception.UnsupportedInterpreter( - "python3/virtualenv3 is buggy on windows") if sys.platform == "win32" and self.envconfig.basepython and \ "jython" in self.envconfig.basepython: raise tox.exception.UnsupportedInterpreter( @@ -154,7 +151,7 @@ class VirtualEnv(object): #if self.getcommandpath("activate").dirpath().check(): # return config_interpreter = self.getsupportedinterpreter() - args = ['virtualenv' + (self._ispython3() and "5" or "")] + args = ['virtualenv'] if not self._ispython3() and self.envconfig.distribute: args.append('--distribute') if not self.envconfig.sitepackages: @@ -229,10 +226,7 @@ class VirtualEnv(object): for repo in l: args = d[repo] - if self._ispython3(): - self.easy_install(args, repo) - else: - self.pip_install(args, repo) + self.pip_install(args, repo) def test(self): self.session.make_emptydir(self.envconfig.envtmpdir) |
