[Pytest-commit] commit/tox: hpk42: Merged in msabramo/tox/issue_164_msabramo_1 (pull request #92)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Sat May 10 09:21:04 CEST 2014
1 new commit in tox:
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.
More information about the pytest-commit
mailing list