[Pytest-commit] commit/tox: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Sep 29 10:11:14 CEST 2014


2 new commits in tox:

https://bitbucket.org/hpk42/tox/commits/25efae2240bf/
Changeset:   25efae2240bf
User:        mgedmin
Date:        2014-09-26 12:39:24+00:00
Summary:     Report subprocess exit code when invocation fails

Fixes #192
Affected #:  2 files

diff -r 69a69d68fc4679616daed127e8f5fd66085805c6 -r 25efae2240bfc9c0cc5f63f472a77814a6bf2327 tests/test_z_cmdline.py
--- a/tests/test_z_cmdline.py
+++ b/tests/test_z_cmdline.py
@@ -200,7 +200,7 @@
     })
     result = cmd.run("tox")
     result.stdout.fnmatch_lines([
-        "ERROR: invocation failed, args: ['*/tox.ini*",
+        "ERROR: invocation failed (errno 13), args: ['*/tox.ini*",
     ])
     assert result.ret
 

diff -r 69a69d68fc4679616daed127e8f5fd66085805c6 -r 25efae2240bfc9c0cc5f63f472a77814a6bf2327 tox/_cmdline.py
--- a/tox/_cmdline.py
+++ b/tox/_cmdline.py
@@ -95,9 +95,9 @@
         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))
+        except OSError as e:
+            self.report.error("invocation failed (errno %d), args: %s, cwd: %s" %
+                              (e.errno, args, cwd))
             raise
         popen.outpath = outpath
         popen.args = [str(x) for x in args]
@@ -118,8 +118,8 @@
         if ret:
             invoked = " ".join(map(str, popen.args))
             if outpath:
-                self.report.error("invocation failed, logfile: %s" %
-                                  outpath)
+                self.report.error("invocation failed (exit code %d), logfile: %s" %
+                                  (ret, outpath))
                 out = outpath.read()
                 self.report.error(out)
                 if hasattr(self, "commandlog"):


https://bitbucket.org/hpk42/tox/commits/e89dddec56e6/
Changeset:   e89dddec56e6
User:        mgedmin
Date:        2014-09-28 09:25:50+00:00
Summary:     Do not rely on specific errno numbers in tests

The error number differs on different platforms (Windows vs Linux).
Affected #:  1 file

diff -r 25efae2240bfc9c0cc5f63f472a77814a6bf2327 -r e89dddec56e6c5844aeb6cc50ea5e2956f53bca6 tests/test_z_cmdline.py
--- a/tests/test_z_cmdline.py
+++ b/tests/test_z_cmdline.py
@@ -200,7 +200,7 @@
     })
     result = cmd.run("tox")
     result.stdout.fnmatch_lines([
-        "ERROR: invocation failed (errno 13), args: ['*/tox.ini*",
+        "ERROR: invocation failed (errno *), args: ['*/tox.ini*",
     ])
     assert result.ret

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