You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/01/27 11:32:48 UTC
svn commit: r903594 - in /subversion/trunk/subversion/tests/cmdline:
depth_tests.py svntest/actions.py
Author: julianfoad
Date: Wed Jan 27 10:32:41 2010
New Revision: 903594
URL: http://svn.apache.org/viewvc?rev=903594&view=rev
Log:
Remove the "run_and_verify_svn_match_any()" functions from the test harness,
in favour of using the appropriate kind of ExpectedOutput class instance.
The latter is a more generic solution; the former was only used in one place.
* subversion/tests/cmdline/depth_tests.py
(verify_depth): Use an ExpectedOutput with run_and_verify_svn() to avoid
using run_and_verify_svn_match_any().
* subversion/tests/cmdline/svntest/actions.py
(run_and_verify_svn_match_any, run_and_verify_svn_match_any2): Remove.
Modified:
subversion/trunk/subversion/tests/cmdline/depth_tests.py
subversion/trunk/subversion/tests/cmdline/svntest/actions.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=903594&r1=903593&r2=903594&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/depth_tests.py Wed Jan 27 10:32:41 2010
@@ -104,8 +104,10 @@
if line.startswith("Depth:"):
raise svntest.failure(msg)
else:
- svntest.actions.run_and_verify_svn_match_any(
- msg, "^Depth: %s\n$" % depth, [], "info", path)
+ expected_stdout = svntest.verify.ExpectedOutput("Depth: %s\n" % depth,
+ match_all=False)
+ svntest.actions.run_and_verify_svn(
+ msg, expected_stdout, [], "info", path)
#----------------------------------------------------------------------
# Ensure that 'checkout --depth=empty' results in a depth-empty working copy.
Modified: subversion/trunk/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/actions.py?rev=903594&r1=903593&r2=903594&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/actions.py Wed Jan 27 10:32:41 2010
@@ -256,38 +256,6 @@
verify.verify_exit_code(message, exit_code, expected_exit)
return exit_code, out, err
-def run_and_verify_svn_match_any(message, expected_stdout, expected_stderr,
- *varargs):
- """Like run_and_verify_svn_match_any2, but the expected exit code is
- assumed to be 0 if no output is expected on stderr, and 1 otherwise."""
-
- expected_exit = 0
- if expected_stderr is not None and expected_stderr != []:
- expected_exit = 1
- return run_and_verify_svn_match_any2(message, expected_stdout,
- expected_stderr, expected_exit,
- *varargs)
-
-
-def run_and_verify_svn_match_any2(message, expected_stdout, expected_stderr,
- expected_exit, *varargs):
- """Like run_and_verify_svn2, except that only one stdout line must match
- EXPECTED_STDOUT."""
-
- if expected_stderr is None:
- raise verify.SVNIncorrectDatatype("expected_stderr must not be None")
-
- want_err = None
- if expected_stderr is not None and expected_stderr != []:
- want_err = True
-
- exit_code, out, err = main.run_svn(want_err, *varargs)
- verify.verify_outputs(message, out, err, expected_stdout, expected_stderr,
- False)
- verify.verify_exit_code(message, exit_code, expected_exit)
- return exit_code, out, err
-
-
def run_and_verify_load(repo_dir, dump_file_content):
"Runs 'svnadmin load' and reports any errors."
if not isinstance(dump_file_content, list):