3 new commits in tox: https://bitbucket.org/hpk42/tox/commits/ce1369598289/ Changeset: ce1369598289 Branch: issue_164_msabramo_1 User: Marc Abramowitz Date: 2014-04-03 23:39:22 Summary: Log more info when catch OSError while doing a popen
Fixes: https://bitbucket.org/hpk42/tox/issue/164/if-install_command-raises-an-oserror-get-a Affected #: 1 file diff -r 0c390972b576b50dc0e78bd5cbb8e6a164f15f8b -r ce13695982897e4050b2aa3f48ed325b1deca520 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -93,8 +93,13 @@ if cwd is None: # XXX cwd = self.session.config.cwd cwd = py.path.local() - popen = self._popen(args, cwd, env=env, - stdout=f, stderr=STDOUT) + try: + popen = self._popen(args, cwd, env=env, + stdout=f, stderr=STDOUT) + except OSError: + self.report.error("invocation failed, args: %s, cwd: %s" % + (args, cwd)) + raise popen.outpath = outpath popen.args = [str(x) for x in args] popen.cwd = cwd https://bitbucket.org/hpk42/tox/commits/b44778191a7b/ Changeset: b44778191a7b Branch: issue_164_msabramo_1 User: Marc Abramowitz Date: 2014-04-29 08:19:28 Summary: Add test_run_custom_install_command_error Affected #: 1 file diff -r ce13695982897e4050b2aa3f48ed325b1deca520 -r b44778191a7b4f50ac24b1d6c05a28096796b0ff tests/test_z_cmdline.py --- a/tests/test_z_cmdline.py +++ b/tests/test_z_cmdline.py @@ -193,6 +193,19 @@ ]) assert result.ret +def test_run_custom_install_command_error(cmd, initproj): + initproj("interp123-0.5", filedefs={ + 'tox.ini': ''' + [testenv] + install_command=./tox.ini {opts} {packages} + ''' + }) + result = cmd.run("tox") + result.stdout.fnmatch_lines([ + "ERROR: invocation failed, args: ['*/tox.ini*", + ]) + assert result.ret + def test_unknown_interpreter_and_env(cmd, initproj): initproj("interp123-0.5", filedefs={ 'tests': {'test_hello.py': "def test_hello(): pass"}, https://bitbucket.org/hpk42/tox/commits/d203e100720d/ Changeset: d203e100720d User: hpk42 Date: 2014-05-10 09:21:01 Summary: Merged in msabramo/tox/issue_164_msabramo_1 (pull request #92) Log more info when catch OSError while doing a popen Affected #: 2 files diff -r 8e2d6a24bd1345158aea401d7afb82e82fcbc4ec -r d203e100720d3b153e557e63f63cfde252edd503 tests/test_z_cmdline.py --- a/tests/test_z_cmdline.py +++ b/tests/test_z_cmdline.py @@ -191,6 +191,19 @@ ]) assert result.ret +def test_run_custom_install_command_error(cmd, initproj): + initproj("interp123-0.5", filedefs={ + 'tox.ini': ''' + [testenv] + install_command=./tox.ini {opts} {packages} + ''' + }) + result = cmd.run("tox") + result.stdout.fnmatch_lines([ + "ERROR: invocation failed, args: ['*/tox.ini*", + ]) + assert result.ret + def test_unknown_interpreter_and_env(cmd, initproj): initproj("interp123-0.5", filedefs={ 'tests': {'test_hello.py': "def test_hello(): pass"}, diff -r 8e2d6a24bd1345158aea401d7afb82e82fcbc4ec -r d203e100720d3b153e557e63f63cfde252edd503 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -92,8 +92,13 @@ if cwd is None: # XXX cwd = self.session.config.cwd cwd = py.path.local() - popen = self._popen(args, cwd, env=env, - stdout=f, stderr=STDOUT) + try: + popen = self._popen(args, cwd, env=env, + stdout=f, stderr=STDOUT) + except OSError: + self.report.error("invocation failed, args: %s, cwd: %s" % + (args, cwd)) + raise popen.outpath = outpath popen.args = [str(x) for x in args] popen.cwd = cwd Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit