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

Re: svn commit: r19463 - trunk/subversion/tests/cmdline/svntest

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-04-28 01:33:00 CEST

Thanks for this and the subsequent cleanup, Michael. Garrett and I
cooked this up yesterday, and I caught it during code review. (He
planned to clean it up later.) I'd actually suggested that he make
this and Skip consistent, and for both make the COND parameter to
their constructors be polymorphic, such that COND could be either a
function, or if not, would be treated as a boolean. Garrett and David
James found this pretty reasonable. Sound okay to you?

- Dan

On Thu, 27 Apr 2006, mhagger@tigris.org wrote:

> Author: mhagger
> Date: Thu Apr 27 16:15:01 2006
> New Revision: 19463
>
> Modified:
> trunk/subversion/tests/cmdline/svntest/testcase.py
>
> Log:
> Rename XFail "cond" constructor argument to cond_func.
>
> This is to avoid confusion with the cond argument to Skip's
> constructor, which is a simple boolean variable.
>
> * subversion/tests/cmdline/svntest/testcase.py (XFail.__init__,
> XFail.convert_result): Rename cond to cond_func.
>
>
> Modified: trunk/subversion/tests/cmdline/svntest/testcase.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/svntest/testcase.py?pathrev=19463&r1=19462&r2=19463
> ==============================================================================
> --- trunk/subversion/tests/cmdline/svntest/testcase.py (original)
> +++ trunk/subversion/tests/cmdline/svntest/testcase.py Thu Apr 27 16:15:01 2006
> @@ -107,7 +107,7 @@
> class XFail(TestCase):
> "A test that is expected to fail."
>
> - def __init__(self, test_case, cond=None):
> + def __init__(self, test_case, cond_func=None):
> TestCase.__init__(self)
> self.test_case = create_test_case(test_case)
> self._list_mode_text = self.test_case.list_mode() or 'XFAIL'
> @@ -116,13 +116,13 @@
> self.need_sandbox = self.test_case.need_sandbox
> self.get_sandbox_name = self.test_case.get_sandbox_name
> self.run = self.test_case.run
> - self.cond = cond
> + self.cond_func = cond_func
>
> def convert_result(self, result):
> # We delay the setting of _result_text to this point because if we do
> # it in __init__ it turns out that useful bits of information (like the
> # fact that we're running over a particular RA layer) are not available.
> - if self.cond is None or self.cond():
> + if self.cond_func is None or self.cond_func():
> self._result_text = ['XFAIL:', 'XPASS:', self.test_case.run_text(2)]
> else:
> self._result_text = ['FAIL:', 'PASS:', self.test_case.run_text(2)]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org

-- 
Daniel Rall

  • application/pgp-signature attachment: stored
Received on Fri Apr 28 01:33:40 2006

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.