Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #4407
| From | "OKB (not okblacke)" <brenNOSPAMbarn@NObrenSPAMbarn.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: skipping one unittest assertion? |
| Date | 2011-05-01 18:14 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <Xns9ED87276142BEOKB@188.40.43.213> (permalink) |
| References | <roy-880487.10134901052011@news.panix.com> |
Roy Smith wrote:
> Is there any way to skip a single assertion in a unittest test
> method? I know I can @skip or @expectedFailure the method, but I'm
> looking for something finer-grain than that.
>
> There's one particular assertion in a test method which depends on
> production code that hasn't been written yet. I could factor that
> out into its own test methods and @skip that, but it would be
> cleaner to be able to mark the particular assertion.
>
> (using python 2.6, but importing unittest2 from 2.7)
Can't you just comment out that line?
--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
skipping one unittest assertion? Roy Smith <roy@panix.com> - 2011-05-01 10:13 -0400
Re: skipping one unittest assertion? Ben Finney <ben+python@benfinney.id.au> - 2011-05-02 00:31 +1000
Re: skipping one unittest assertion? Roy Smith <roy@panix.com> - 2011-05-01 11:55 -0400
Re: skipping one unittest assertion? Ben Finney <ben+python@benfinney.id.au> - 2011-05-02 07:45 +1000
Re: skipping one unittest assertion? "OKB (not okblacke)" <brenNOSPAMbarn@NObrenSPAMbarn.net> - 2011-05-01 18:14 +0000
Re: skipping one unittest assertion? Roy Smith <roy@panix.com> - 2011-05-01 14:16 -0400
Re: skipping one unittest assertion? Chris Angelico <rosuav@gmail.com> - 2011-05-02 06:51 +1000
csiph-web