Author: julianfoad
Date: Thu Dec 10 18:08:50 2009
New Revision: 889352

URL: http://svn.apache.org/viewvc?rev=889352&view=rev
Log:
More doc strings in the test suite.

* subversion/tests/cmdline/svntest/tree.py
  (SVNTreeNode.as_state): Add a doc string.

* subversion/tests/cmdline/svntest/wc.py
  (State): Extend the doc string.
  (to_relpath, to_ospath, path_to_key): Add doc strings.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/tree.py
    subversion/trunk/subversion/tests/cmdline/svntest/wc.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/tree.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/tree.py?rev=889352&r1=889351&r2=889352&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/tree.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/tree.py Thu Dec 10 
18:08:50 2009
@@ -315,6 +315,7 @@
     return cmp(self.name, other.name)
 
   def as_state(self, prefix=None):
+    """Return an svntest.wc.State instance that is equivalent to this tree."""
     root = self
     if self.path == root_node_name:
       assert prefix is None

Modified: subversion/trunk/subversion/tests/cmdline/svntest/wc.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/wc.py?rev=889352&r1=889351&r2=889352&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Thu Dec 10 18:08:50 
2009
@@ -104,7 +104,9 @@
   The primary metaphor here is a dictionary of paths mapping to instances
   of StateItem, which describe each item in a working copy.
 
-  Note: the paths should be *relative* to the root of the working copy.
+  Note: the paths should be *relative* to the root of the working copy,
+  using '/' for the separator (see to_relpath()), and the root of the
+  working copy is identified by the empty path: ''.
   """
 
   def __init__(self, wc_dir, desc):
@@ -751,12 +753,17 @@
   to_relpath = to_ospath = lambda path: path
 else:
   def to_relpath(path):
+    """Return PATH but with all native path separators changed to '/'."""
     return path.replace(os.sep, '/')
   def to_ospath(path):
+    """Return PATH but with each '/' changed to the native path separator."""
     return path.replace('/', os.sep)
 
 
 def path_to_key(path, base):
+  """Return the relative path that represents the absolute path PATH under
+  the absolute path BASE.  PATH must be a path under BASE.  The returned
+  path has '/' separators."""
   if path == base:
     return ''
 


Reply via email to