[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Proposal: Use decorators in test suite for XFail, Skip, etc

From: Blair Zajac <blair_at_orcaware.com>
Date: Fri, 4 Feb 2011 11:03:31 -0800

On Feb 4, 2011, at 9:15 AM, Hyrum K Wright wrote:

> We currently mark tests XFail (or Skip, or something else) by wrapping
> them in the test_list in the test suite. Rather than doing it there,
> I think it makes more sense to use Python's decorator syntax to mark
> tests as XFail right at their definition, rather than down in the test
> list. Keeping all attributes of a test in close proximity is a Good
> Thing, imo. Attached is a patch which demonstrates this.
>
> Decorators were added to Python in 2.4, which is the minimal version
> required for our test suite. In addition to the functional
> decorators, we should be able to add ones which record other
> information, such as the issues which the tests were added for. (In
> some future world, we could also divide up the test suite into
> "levels", and decorators could be added to indicate that.)
>
> Thoughts?

Sounds good to me.

The decorators could have a required issue version number as a parameter, thereby forcing an issue to exist in the issue tracker.

Blair
Received on 2011-02-04 20:04:15 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.