[py-dev] Feature proposition
holger krekel
holger at merlinux.eu
Wed Sep 9 21:36:00 CEST 2009
Hi Maciej,
> Hi.
>
> I have a feature proposition that I'm missing every now and then from
> py.test.
> Basically the idea is to be able to categorize tests with some
> keywords, other than
> just test name or part of it. Example:
>
> http://paste.pocoo.org/show/138853/
>
> And I would like to be able to run py.test -k +foo for example to run
> TestFoo and TestOther
> (or some other syntax).
makes sense i think. maybe as an extension to per-function
"py.test.mark" decorators:
class TestSomething:
mark = ['foo']
so that you can also do:
class TestSomething:
mark = ['xfail']
(and eventually mark = ['skip'] - seems logical to have a declarative
'skip' and maybe an imperative 'xfail')
> The concrete use case is for example to mark all translation tests in
> pypy test suite
> (or part of it).
sure. There a few things that could be improved regarding keywords
and keyword selection, i think.
best,
holger
More information about the Pytest-dev
mailing list