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/26 13:34:12 UTC

svn commit: r903198 - in /subversion/trunk/subversion/tests/cmdline/svntest: actions.py main.py

Author: julianfoad
Date: Tue Jan 26 12:34:12 2010
New Revision: 903198

URL: http://svn.apache.org/viewvc?rev=903198&view=rev
Log:
Expand some doc strings in the test framework.

* subversion/tests/cmdline/svntest/actions.py
  (run_and_verify_svn2): Document that line terminators are included in the
    returned stdout and stderr.

* subversion/tests/cmdline/svntest/main.py
  (run_command, wait_on_pipe, spawn_process, run_command_stdin, run_svn,
  run_svnadmin, run_svnlook, run_svnsync, run_svnversion): Document that
    line terminators are included in the returned stdout and stderr.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/actions.py
    subversion/trunk/subversion/tests/cmdline/svntest/main.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/actions.py?rev=903198&r1=903197&r2=903198&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/actions.py Tue Jan 26 12:34:12 2010
@@ -220,9 +220,10 @@
 
 def run_and_verify_svn2(message, expected_stdout, expected_stderr,
                         expected_exit, *varargs):
-  """Invokes main.run_svn() with *VARARGS, returns exit code as int, stdout
-  and stderr as lists of lines.  For both EXPECTED_STDOUT and EXPECTED_STDERR,
-  create an appropriate instance of verify.ExpectedOutput (if necessary):
+  """Invoke main.run_svn() with *VARARGS. Return exit code as int; stdout,
+  stderr as lists of lines (including line terminators).  For both
+  EXPECTED_STDOUT and EXPECTED_STDERR, create an appropriate instance of
+  verify.ExpectedOutput (if necessary):
 
      - If it is an array of strings, create a vanilla ExpectedOutput.
 

Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=903198&r1=903197&r2=903198&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Tue Jan 26 12:34:12 2010
@@ -358,9 +358,9 @@
 
 # Run any binary, logging the command line and return code
 def run_command(command, error_expected, binary_mode=0, *varargs):
-  """Run COMMAND with VARARGS; return exit code as int; stdout, stderr
-  as lists of lines.  See run_command_stdin() for details.
-  If ERROR_EXPECTED is None, any stderr also will be printed."""
+  """Run COMMAND with VARARGS. Return exit code as int; stdout, stderr
+  as lists of lines (including line terminators).  See run_command_stdin()
+  for details.  If ERROR_EXPECTED is None, any stderr also will be printed."""
 
   return run_command_stdin(command, error_expected, binary_mode,
                            None, *varargs)
@@ -433,8 +433,8 @@
   to finish, dying if it does.  If KID fails, create an error message
   containing any stdout and stderr from the kid.  Show COMMAND_STRING in
   diagnostic messages.  Normalize Windows line endings of stdout and stderr
-  if not BINARY_MODE.  Return KID's exit code, stdout and stderr (the latter
-  two as lists)."""
+  if not BINARY_MODE.  Return KID's exit code as int; stdout, stderr as
+  lists of lines (including line terminators)."""
   if waiter is None:
     return
 
@@ -477,7 +477,9 @@
 
 def spawn_process(command, binary_mode=0, stdin_lines=None, *varargs):
   """Run any binary, supplying input text, logging the command line.
-  Normalize Windows line endings of stdout and stderr if not BINARY_MODE."""
+  Normalize Windows line endings of stdout and stderr if not BINARY_MODE.
+  Return exit code as int; stdout, stderr as lists of lines (including
+  line terminators)."""
   if stdin_lines and not isinstance(stdin_lines, list):
     raise TypeError("stdin_lines should have list type")
 
@@ -509,7 +511,8 @@
   is willing to buffer, this will deadlock, with both Python and
   COMMAND waiting to write to each other for ever.
   Normalize Windows line endings of stdout and stderr if not BINARY_MODE.
-  Return exit code as int; stdout, stderr as lists of lines.
+  Return exit code as int; stdout, stderr as lists of lines (including
+  line terminators).
   If ERROR_EXPECTED is None, any stderr also will be printed."""
 
   if verbose_mode:
@@ -594,7 +597,7 @@
 # For running subversion and returning the output
 def run_svn(error_expected, *varargs):
   """Run svn with VARARGS; return exit code as int; stdout, stderr as
-  lists of lines.
+  lists of lines (including line terminators).
   If ERROR_EXPECTED is None, any stderr also will be printed.  If
   you're just checking that something does/doesn't come out of
   stdout/stderr, you might want to use actions.run_and_verify_svn()."""
@@ -604,23 +607,23 @@
 # For running svnadmin.  Ignores the output.
 def run_svnadmin(*varargs):
   """Run svnadmin with VARARGS, returns exit code as int; stdout, stderr as
-  list of lines."""
+  list of lines (including line terminators)."""
   return run_command(svnadmin_binary, 1, 0, *varargs)
 
 # For running svnlook.  Ignores the output.
 def run_svnlook(*varargs):
   """Run svnlook with VARARGS, returns exit code as int; stdout, stderr as
-  list of lines."""
+  list of lines (including line terminators)."""
   return run_command(svnlook_binary, 1, 0, *varargs)
 
 def run_svnsync(*varargs):
   """Run svnsync with VARARGS, returns exit code as int; stdout, stderr as
-  list of lines."""
+  list of lines (including line terminators)."""
   return run_command(svnsync_binary, 1, 0, *(_with_config_dir(varargs)))
 
 def run_svnversion(*varargs):
   """Run svnversion with VARARGS, returns exit code as int; stdout, stderr
-  as list of lines."""
+  as list of lines (including line terminators)."""
   return run_command(svnversion_binary, 1, 0, *varargs)
 
 def run_entriesdump(path):