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.)
--- 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 _inner(sbox):
+ return f(sbox)
+ _inner.__doc__ = f.__doc__
+ return XFail(_inner)
"""Like XFail, but indicates a work-in-progress: an unexpected pass
is not considered a test failure."""
--- subversion/tests/cmdline/basic_tests.py (revision 1067180)
+++ subversion/tests/cmdline/basic_tests.py (working copy)
@@ -1961,6 +1961,7 @@
# Test for issue #1199
"remotely remove directories from two repositories"
@@ -2721,7 +2722,7 @@
Received on 2011-02-04 18:15:56 CET