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? -Hyrum [[[ Index: subversion/tests/cmdline/svntest/testcase.py =================================================================== --- subversion/tests/cmdline/svntest/testcase.py (revision 1067180) +++ subversion/tests/cmdline/svntest/testcase.py (working copy) @@ -207,6 +207,14 @@ return self._delegate.list_mode() or 'XFAIL' +def xfail_deco(f): + def _inner(sbox): + return f(sbox) + + _inner.__doc__ = f.__doc__ + return XFail(_inner) + + class Wimp(XFail): """Like XFail, but indicates a work-in-progress: an unexpected pass is not considered a test failure.""" Index: subversion/tests/cmdline/basic_tests.py =================================================================== --- subversion/tests/cmdline/basic_tests.py (revision 1067180) +++ subversion/tests/cmdline/basic_tests.py (working copy) @@ -1961,6 +1961,7 @@ expected_status) # Test for issue #1199 +@svntest.testcase.xfail_deco def basic_rm_urls_multi_repos(sbox): "remotely remove directories from two repositories" @@ -2721,7 +2722,7 @@ delete_keep_local_twice, windows_paths_in_repos, basic_rm_urls_one_repo, - XFail(basic_rm_urls_multi_repos), + basic_rm_urls_multi_repos, automatic_conflict_resolution, info_nonexisting_file, basic_relative_url_using_current_dir, ]]]