You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2011/02/03 01:23:03 UTC
svn commit: r1066709 - in /subversion/trunk/subversion/tests/cmdline:
depth_tests.py svntest/main.py svntest/testcase.py
Author: danielsh
Date: Thu Feb 3 00:23:02 2011
New Revision: 1066709
URL: http://svn.apache.org/viewvc?rev=1066709&view=rev
Log:
Allow each XFail test to declare its associated issue.
* subversion/tests/cmdline/svntest/testcase.py
(TestCase.__init__): Add and store 'issues' attribute.
(XFail.__init__): Add 'issues' attribute and pass it to TestCase.
* subversion/tests/cmdline/svntest/main.py
(TestRunner.list): Print associated issue numbers.
* subversion/tests/cmdline/depth_tests.py
(test_list): Declare info_excluded()'s associated issue.
Modified:
subversion/trunk/subversion/tests/cmdline/depth_tests.py
subversion/trunk/subversion/tests/cmdline/svntest/main.py
subversion/trunk/subversion/tests/cmdline/svntest/testcase.py
Modified: subversion/trunk/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/depth_tests.py?rev=1066709&r1=1066708&r2=1066709&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/depth_tests.py Thu Feb 3 00:23:02 2011
@@ -2841,7 +2841,7 @@ test_list = [ None,
excluded_path_misc_operation,
excluded_receive_remote_removal,
exclude_keeps_hidden_entries,
- XFail(info_excluded),
+ XFail(info_excluded, issues=3792),
tree_conflicts_resolved_depth_empty,
tree_conflicts_resolved_depth_files,
tree_conflicts_resolved_depth_immediates,
Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1066709&r1=1066708&r2=1066709&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Thu Feb 3 00:23:02 2011
@@ -1157,15 +1157,16 @@ class TestRunner:
or options.mode_filter.upper() == self.pred.list_mode().upper() \
or (options.mode_filter.upper() == 'PASS' \
and self.pred.list_mode() == ''):
+ tail = ''
+ if self.pred.issues:
+ tail += " [%s]" % ','.join(['#%d' % i for i in self.pred.issues])
if options.verbose and self.pred.inprogress:
- print(" %3d %-5s %s [[%s]]" % (self.index,
- self.pred.list_mode(),
- self.pred.description,
- self.pred.inprogress))
+ tail += " [[%s]]" % self.pred.inprogress
else:
- print(" %3d %-5s %s" % (self.index,
- self.pred.list_mode(),
- self.pred.description))
+ print(" %3d %-5s %s%s" % (self.index,
+ self.pred.list_mode(),
+ self.pred.description,
+ tail))
sys.stdout.flush()
def get_mode(self):
Modified: subversion/trunk/subversion/tests/cmdline/svntest/testcase.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/testcase.py?rev=1066709&r1=1066708&r2=1066709&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/testcase.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/testcase.py Thu Feb 3 00:23:02 2011
@@ -70,7 +70,8 @@ class TestCase:
RESULT_SKIP: (2, TextColors.success('SKIP: '), True),
}
- def __init__(self, delegate=None, cond_func=lambda: True, doc=None, wip=None):
+ def __init__(self, delegate=None, cond_func=lambda: True, doc=None, wip=None,
+ issues=None):
"""Create a test case instance based on DELEGATE.
COND_FUNC is a callable that is evaluated at test run time and should
@@ -91,6 +92,10 @@ class TestCase:
self._cond_func = cond_func
self.description = doc or delegate.description
self.inprogress = wip
+ if type(issues) == type(0):
+ self.issues = [issues]
+ else:
+ self.issues = issues
def get_function_name(self):
"""Return the name of the python function implementing the test."""
@@ -179,7 +184,8 @@ class XFail(TestCase):
RESULT_SKIP: (2, TextColors.success('SKIP: '), True),
}
- def __init__(self, test_case, cond_func=lambda: True, wip=None):
+ def __init__(self, test_case, cond_func=lambda: True, wip=None,
+ issues=None):
"""Create an XFail instance based on TEST_CASE. COND_FUNC is a
callable that is evaluated at test run time and should return a
boolean value. If COND_FUNC returns true, then TEST_CASE is
@@ -189,9 +195,12 @@ class XFail(TestCase):
information that are not available at __init__ time (like the fact
that we're running over a particular RA layer).
- WIP is ..."""
+ WIP is ...
+
+ ISSUES is an issue number (or a list of issue numbers) tracking this."""
- TestCase.__init__(self, create_test_case(test_case), cond_func, wip=wip)
+ TestCase.__init__(self, create_test_case(test_case), cond_func, wip=wip,
+ issues=issues)
def list_mode(self):
# basically, the only possible delegate is a Skip test. favor that mode.