[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: Benjamin Peterson <benjamin_at_python.org>
Date: Sat, 5 Feb 2011 03:22:06 +0000 (UTC)

Hyrum K Wright <hyrum <at> hyrumwright.org> writes:
>
> [[[
>
> Index: subversion/tests/cmdline/svntest/testcase.py
> ===================================================================
> --- subversion/tests/cmdline/svntest/testcase.py (revision 1067239)
> +++ subversion/tests/cmdline/svntest/testcase.py (working copy)
> @@ -108,6 +108,13 @@ class TestCase:
> """
> return self._delegate.get_sandbox_name()
>
> + def set_issues(self, issues):
> + """Set the issues associated with this test."""
> + if type(issues) == type(0):

You should use isinstance(issues, int). Or even better see below.

> +def issue_deco(issues):

How about using *issues. Then you won't have to put issues in a list. Also you
can simply set_issues().
Received on 2011-02-05 04:25:43 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.