Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #62941
| References | <l9v02l$a91$1@panix2.panix.com> |
|---|---|
| Date | 2014-01-01 11:14 +1100 |
| Subject | Re: What does --no-skip do in nose? |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4766.1388535625.18130.python-list@python.org> (permalink) |
On Wed, Jan 1, 2014 at 4:49 AM, Roy Smith <roy@panix.com> wrote: >> from nose import SkipTest >> def test_skip(): >> raise SkipTest >> assert 0 > > What's confusing is, if I use --no-skip, it STILL skips the test: > I don't know nosetests, but I'm fairly sure it's not going to be mangling the Python language itself. Once you say "raise", the rest of the code isn't going to run. If you were calling "skip_test()", then I could imagine it either raising SkipTest or not based on a command-line parameter, but if there's no such function and you directly raise the exception, there's not a lot else Python can do. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What does --no-skip do in nose? roy@panix.com (Roy Smith) - 2013-12-31 12:49 -0500 Re: What does --no-skip do in nose? Chris Angelico <rosuav@gmail.com> - 2014-01-01 11:14 +1100 Re: What does --no-skip do in nose? Ned Batchelder <ned@nedbatchelder.com> - 2013-12-31 20:50 -0500
csiph-web