[Checkins] SVN: zc.buildout/branches/aaron-testing-changes/src/zc/buildout/testing. Documentation enhancements.

Aaron Lehmann aaron at zope.com
Wed Sep 3 10:23:31 EDT 2008


Log message for revision 90766:
  Documentation enhancements.
  
  

Changed:
  U   zc.buildout/branches/aaron-testing-changes/src/zc/buildout/testing.py
  U   zc.buildout/branches/aaron-testing-changes/src/zc/buildout/testing.txt

-=-
Modified: zc.buildout/branches/aaron-testing-changes/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/branches/aaron-testing-changes/src/zc/buildout/testing.py	2008-09-03 14:05:17 UTC (rev 90765)
+++ zc.buildout/branches/aaron-testing-changes/src/zc/buildout/testing.py	2008-09-03 14:23:30 UTC (rev 90766)
@@ -221,6 +221,18 @@
         return url
 
     def setupBuildout(test, *args):
+        """ setupBuildout -- Sets up a Buildout for testing
+
+            test - The test suite in which this will be used, this is expected
+                   to be baked in via a curry
+            args - This will be split up as follows:
+                dir1..dirN, filename, buildout_cfg
+                dir1..dirN - directories in the path to the buildout
+                     to bootstrap
+                filename - the filename to write the configuration into
+                buildout_cfg - the configuration to be used to buildout.
+        """
+
         args = list(args)
         cfg = args.pop()
         filename = args.pop()

Modified: zc.buildout/branches/aaron-testing-changes/src/zc/buildout/testing.txt
===================================================================
--- zc.buildout/branches/aaron-testing-changes/src/zc/buildout/testing.txt	2008-09-03 14:05:17 UTC (rev 90765)
+++ zc.buildout/branches/aaron-testing-changes/src/zc/buildout/testing.txt	2008-09-03 14:23:30 UTC (rev 90766)
@@ -129,13 +129,17 @@
     - on Unix, try running python%(version)s or just python to get the
       executable
 
-``setupBuildout(path, buildout)``
-    This function rebuilds the buildout using the buildout in the string
-    buildout, and returns the object.  The object can then be introspected as a
-    mapping or manipulated via buildout.install().  This is useful for testing,
-    because pdb can be used normally, which is prevented when one uses system() to
-    fork a process.
+``setupBuildout(dir1...dirN, filename, buildout_cfg)``
+    This function writes the configuration in buildout_cfg into
+    os.path.join(dir1...dirN, filename).  It then chdirs into the same
+    directory, bootstraps a Buildout object, and returns the object.  This
+    allows recipe writers to test their recipes in process, and allows the
+    Buildout to be introspected more easily.
 
+    *DISCLAIMER*:  There is currently no promise of backward compatibility in
+    the API between versions of zc.buildout, and its methods are not to be
+    viewed as a public API.
+
 ``zc.buildout.testing.buildoutTearDown(test)``
 ----------------------------------------------
 



More information about the Checkins mailing list