[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: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Tue, 8 Feb 2011 02:57:11 +0000

On Sat, Feb 5, 2011 at 3:22 AM, Benjamin Peterson <benjamin_at_python.org> wrote:
> 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().

Updated both of these in r1068256. Thanks for the review!

-Hyrum
Received on 2011-02-08 03:57:52 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.