diff options
author | holger krekel <holger@merlinux.eu> | 2016-06-20 17:38:24 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2016-06-20 17:38:24 +0200 |
commit | dc11f23e50f7814d332f164892a5f99109a07cb4 (patch) | |
tree | 269a420ab7938e4f9333c42aee1ae7e3d84d2523 /tox/_pytestplugin.py | |
parent | f3e6f8cda37e6fcb87992638ad52ef83eeaafa08 (diff) | |
parent | df580330eaa1bbce79012f8cfaa5c4d0a5ddf93d (diff) | |
download | tox-dc11f23e50f7814d332f164892a5f99109a07cb4.tar.gz |
add --workdir option to override where tox stores its ".tox" directory
and all of the virtualenv environment. Thanks Danring.
Diffstat (limited to 'tox/_pytestplugin.py')
-rw-r--r-- | tox/_pytestplugin.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tox/_pytestplugin.py b/tox/_pytestplugin.py index f15d2ec..4dfc497 100644 --- a/tox/_pytestplugin.py +++ b/tox/_pytestplugin.py @@ -68,12 +68,12 @@ class ReportExpectMock: def generic_report(*args, **kwargs): self._calls.append((name,) + args) - print ("%s" % (self._calls[-1], )) + print("%s" % (self._calls[-1], )) return generic_report def action(self, venv, msg, *args): self._calls.append(("action", venv, msg)) - print ("%s" % (self._calls[-1], )) + print("%s" % (self._calls[-1], )) return Action(self.session, venv, msg, args) def getnext(self, cat): @@ -195,6 +195,9 @@ class Cmd: return py.std.subprocess.Popen(argv, stdout=stdout, stderr=stderr, **kw) def run(self, *argv): + if argv[0] == "tox" and sys.version_info[:2] < (2,7): + pytest.skip("can not run tests involving calling tox on python2.6. " + "(and python2.6 is about to be deprecated anyway)") argv = [str(x) for x in argv] assert py.path.local.sysfind(str(argv[0])), argv[0] p1 = self.tmpdir.join("stdout") @@ -316,7 +319,7 @@ def initproj(request, tmpdir): for p in base.visit(lambda x: x.check(file=1)): manifestlines.append("include %s" % p.relto(base)) create_files(base, {"MANIFEST.in": "\n".join(manifestlines)}) - print ("created project in %s" % (base,)) + print("created project in %s" % (base,)) base.chdir() return initproj |