-
Notifications
You must be signed in to change notification settings - Fork 824
Closed
Description
This is a very minor enhancement. I'm writing it down so as not to forget.
I came across a way of not needing parentheses in the test decorator (implemented in the flaky nose plugin).
This would be nice to have, as it would simplify the default knownfailure decorator syntax.
As it stands right now we always need to write down the parentheses (@knownfailure()) even if we're passing no arguments to the decorator.
Rich e:
This is referring to the knownfailure decorator in our testsuite.
Ideally this should work like so:
# can use default kwargs without having the brackets
@knownfailure
def test_this():
assert_(1 == 2)
# but the same decorator works with brackets to specify parameters
@knownfailure(exc_type=ValueError)
def test_that():
some_function() # which will raise ValueError currently, as a known problemReactions are currently unavailable