Example of test failure output with pytest
Brianna Laugher
brianna.laugher at gmail.com
Thu May 14 07:18:14 EDT 2015
On 14 May 2015 at 00:39, Mads Kiilerich <mads at kiilerich.com> wrote:
> Some pytest feedback:
> I'm sorry for being lazy and not approaching upstream, but it is so
> appealing to talk directly to the friendly ambassadors ;-)
I think that is exactly what we are for :)
> 2. I would expect to be able to run 'py.test
> TestHomeController.test_index_with_anonymous_access_disabled' to rerun the
> failure. But I can't. A quick look at py.test -h tells me that it wants a
> filename but doesn't give any hint I can use directly.
So what you want here is -k. e.g.
py.test -k 'TestHomeController.test_index_with_anonymous_access_disabled'
-k will match on any part of the file name, class name,
method/function name, and also any marks (which I suspect you are not
using yet).
Likely you can just use
py.test -k 'test_index_with_anonymous_access_disabled'
or even just
py.test -k 'anonymous'
(although of course there might be other tests that get picked up by this)
cheers
Brianna
--
They've just been waiting in a mountain for the right moment:
http://modernthings.org/
More information about the kallithea-general
mailing list