On Mon, 11 Jun 2007, kameshj@tigris.org wrote:
> Author: kameshj
> Date: Mon Jun 11 05:05:31 2007
> New Revision: 25357
>
> Log:
> Skip condition is made as a lamda function.
This should be written in a more active voice:
"svntest: Allow Skip condition to be a lambda function."
> * subversion/tests/cmdline/svntest/testcase.py
> (Skip.__init__): Signature change cond -> cond_func a lamda function callable
> at test runtime. Call this lambda function, if it returns True set
> list_mode_text to 'SKIP'.
> (Skip.need_sandbox): Call cond_func.
> (Skip.run): Call cond_func.
>
> * subversion/tests/cmdline/svntest/main.py
> (is_non_posix_os): New function.
I'd rather see this API written using non-negative logic (case in
point, that phrasing was more difficult to understand that needed to
be):
is_posix_os()
...
> --- trunk/subversion/tests/cmdline/prop_tests.py (original)
> +++ trunk/subversion/tests/cmdline/prop_tests.py Mon Jun 11 05:05:31 2007
> @@ -28,6 +28,8 @@
> XFail = svntest.testcase.XFail
> Item = svntest.wc.StateItem
>
> +def is_non_posix_and_non_windows_os():
A doc string stating that this is used as a lambda function in
test_list might be useful here.
> + return svntest.main.is_non_posix_os() and sys.platform != 'win32'
>
> # Helper functions
> def check_prop(name, path, exp_out):
> @@ -1366,8 +1368,7 @@
> copy_inherits_special_props,
> # If we learn how to write a pre-revprop-change hook for
> # non-Posix platforms, we won't have to skip here:
> - Skip(revprop_change, (os.name != 'posix'
> - and sys.platform != 'win32')),
> + Skip(revprop_change, is_non_posix_and_non_windows_os),
> prop_value_conversions,
> binary_props,
> recursive_base_wc_ops,
...
- application/pgp-signature attachment: stored
Received on Mon Jun 11 17:47:13 2007