Author: julianfoad
Date: Tue Dec  8 16:21:12 2009
New Revision: 888465

URL: http://svn.apache.org/viewvc?rev=888465&view=rev
Log:
Improve doc strings in the regression test framework.

* subversion/tests/cmdline/svntest/actions.py
  (make_repo_and_wc): Mention that it makes a 'Greek Tree'.

* subversion/tests/cmdline/svntest/main.py
  (run_command): Refer the reader to run_command_stdin() for details.
  (wait_on_pipe): Add some documentation that was missing.
  (spawn_process): Convert the plain comment into a doc string and document
    the 'binary_mode' parameter.
  (run_command_stdin): Document the 'binary_mode' parameter.

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=888465&r1=888464&r2=888465&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/actions.py Tue Dec  8 
16:21:12 2009
@@ -1468,7 +1468,7 @@
 
 # This allows a test to *quickly* bootstrap itself.
 def make_repo_and_wc(sbox, create_wc = True, read_only = False):
-  """Create a fresh repository and checkout a wc from it.
+  """Create a fresh 'Greek Tree' repository and check out a WC from it.
 
   If read_only is False, a dedicated repository will be created, named
   TEST_NAME. The repository will live in the global dir 'general_repo_dir'.

Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=888465&r1=888464&r2=888465&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Tue Dec  8 
16:21:12 2009
@@ -360,7 +360,7 @@
 # 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.
+  as lists of lines.  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,
@@ -430,10 +430,12 @@
   return p.stdin, p.stdout, p.stderr, (p, command_string)
 
 def wait_on_pipe(waiter, binary_mode, stdin=None):
-  """Waits for KID (opened with open_pipe) to finish, dying
-  if it does.  If kid fails create an error message containing
-  any stdout and stderr from the kid.  Returns kid's exit code,
-  stdout and stderr (the latter two as lists)."""
+  """WAITER is (KID, COMMAND_STRING).  Wait for KID (opened with open_pipe)
+  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 waiter is None:
     return
 
@@ -474,8 +476,9 @@
                        % (command_string, exit_code))
     return stdout_lines, stderr_lines, exit_code
 
-# Run any binary, supplying input text, logging the command line
 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."""
   if stdin_lines and not isinstance(stdin_lines, list):
     raise TypeError("stdin_lines should have list type")
 
@@ -506,6 +509,7 @@
   should not be very large, as if the program outputs more than the OS
   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.
   If ERROR_EXPECTED is None, any stderr also will be printed."""
 


Reply via email to