Exit status propagation

7 views
Skip to first unread message

JT Olds

unread,
Feb 15, 2012, 5:30:35 PM2/15/12
to Coverage.py Development
Hey,

I cannot for the life of me figure out how to turn a bitbucket patch
queue into a pull request on the main coverage repo. So confusing.

Anyway, when you execute coverage like so:

python -m coverage python/test/runner/script

it totally blows away the exit status. This problem is similar to
https://bitbucket.org/ned/coveragepy/issue/103/exit-status-is-not-propagated
but not completely the same.

Whereas in that ticket, the complaint is that cmdline's main doesn't
call sys.exit with the appropriate exit status (just returns it), my
complaint is that the __main__.py package execution script is not
calling sys.exit with the result of cmdline's main.

Here is my bitbucket patch queue (hg is all new to me):

https://bitbucket.org/jtolds/exit-status-with-package-main-invocation/changeset/e1169d0941cf

Can we get that submitted?

The reason to use 'python -m coverage' instead of just 'coverage' is
if you are using virtualenv or something, and the right python is in
your path but the right coverage is not.

-JT

Ned Batchelder

unread,
Feb 15, 2012, 11:00:05 PM2/15/12
to coverag...@googlegroups.com, JT Olds
Thanks, JT, I just took and pushed this change. I don't understand
patch queues either, especially on bitbucket, but this was easy enough
to apply by hand.

Thanks.

--Ned.

Reply all
Reply to author
Forward
0 new messages