[Checkins] SVN: zc.buildout/branches/regebro-python3/src/zc/buildout/ The tests in rmtree.py and windows.txt run now, as well as most in virtualenv.txt.

Lennart Regebro regebro at gmail.com
Wed Nov 24 09:16:08 EST 2010


Log message for revision 118559:
  The tests in rmtree.py and windows.txt run now, as well as most in virtualenv.txt.
  

Changed:
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/rmtree.py
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/virtualenv.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt

-=-
Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt	2010-11-24 13:54:15 UTC (rev 118558)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt	2010-11-24 14:16:07 UTC (rev 118559)
@@ -1613,7 +1613,6 @@
     Uninstalling debug.
     Installing service.
     chkconfig --add /path/to/script
-    <BLANKLINE>
 
 The service has been installed. If the buildout is run again with no
 changes, the service shouldn't be changed.
@@ -1621,7 +1620,6 @@
     >>> bprint(system(buildout))
     Develop: '/sample-buildout/recipes'
     Updating service.
-    <BLANKLINE>
 
 Now we change the service part to trigger uninstallation and
 re-installation.
@@ -1644,7 +1642,6 @@
     chkconfig --del /path/to/script
     Installing service.
     chkconfig --add /path/to/a/different/script
-    <BLANKLINE>
 
 Now we remove the service part, and add another part.
 
@@ -1665,7 +1662,6 @@
     chkconfig --del /path/to/a/different/script
     Installing debug.
     recipe recipes:debug
-    <BLANKLINE>
 
 Uninstall recipes don't have to take care of removing all the files
 and directories created by the part. This is still done automatically,
@@ -1732,7 +1728,6 @@
     dir: Creating directory my_directory
     Installing debug.
     recipe recipes:debug
-    <BLANKLINE>
 
 Now we remove the part from the configuration file.
 
@@ -1756,7 +1751,6 @@
     backing up directory /sample-buildout/my_directory of size 0
     Updating debug.
     recipe recipes:debug
-    <BLANKLINE>
 
 Now we will return the registration to normal for the benefit of the
 rest of the examples.

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/rmtree.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/rmtree.py	2010-11-24 13:54:15 UTC (rev 118558)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/rmtree.py	2010-11-24 14:16:07 UTC (rev 118559)
@@ -38,7 +38,7 @@
     Now create a file ...
 
     >>> foo = os.path.join (d, 'foo')
-    >>> open (foo, 'w').write ('huhu')
+    >>> written = open (foo, 'w').write ('huhu')
 
     and make it unwriteable
 

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/virtualenv.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/virtualenv.txt	2010-11-24 13:54:15 UTC (rev 118558)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/virtualenv.txt	2010-11-24 14:16:07 UTC (rev 118559)
@@ -73,9 +73,9 @@
     ... argv = new_argv
     ... '''
     >>> for line in py_lines:
-    ...     py_file.write(line)
+    ...     written = py_file.write(line)
     ...     if line.startswith('environ = os.environ.copy()'):
-    ...         py_file.write(extra)
+    ...         written = py_file.write(extra)
     ...         print('Rewritten.')
     ... 
     Rewritten.
@@ -83,7 +83,7 @@
     >>> sitecustomize_path = join(os.path.dirname(site_packages_path),
     ...                           'parts', 'py', 'sitecustomize.py')
     >>> sitecustomize_file = open(sitecustomize_path, 'a')
-    >>> sitecustomize_file.write('''
+    >>> written = sitecustomize_file.write('''
     ... import os, sys
     ... sys.executable = %r
     ... if 'BROKEN_DASH_S' in os.environ:
@@ -99,7 +99,7 @@
     ...                 # right errors when the fixes are absent, and
     ...                 # works well enough when the fixes are present.
     ...                 klass.site = sys.modules.pop('site')
-    ...             if fullname == 'ConfigParser':
+    ...             if fullname == 'pprint':
     ...                 raise ImportError(fullname)
     ...             elif fullname == 'site':
     ...                 # Keep the site module from being processed twice.
@@ -114,18 +114,19 @@
     ...     sys.meta_path.append(ImportHook)
     ... ''' % (py_path,))
     >>> sitecustomize_file.close()
-    >>> print(call_py(
+    >>> bprint(call_py(
     ...     _safe_arg(py_path),
-    ...     "import ConfigParser"))
+    ...     "import pprint"))
     <BLANKLINE>
-    >>> print('X'); print(call_py(
+    
+    >>> bprint('X'); bprint(call_py(
     ...     _safe_arg(py_path),
-    ...     "import ConfigParser",
+    ...     "import pprint",
     ...     '-S')) # doctest: +ELLIPSIS
     X...Traceback (most recent call last):
       ...
-    ImportError: No module named ConfigParser
-    <BLANKLINE>
+    ImportError: No module named pprint
+    
     >>> from zc.buildout.easy_install import _has_broken_dash_S
     >>> _has_broken_dash_S(py_path)
     True
@@ -157,7 +158,7 @@
     ... parts =
     ... ''')
     >>> write('bootstrap.py', open(bootstrap_py).read())
-    >>> print('X'); bprint(system(
+    >>> bprint('X'); bprint(system(
     ...     _safe_arg(py_path)+' '+
     ...     'bootstrap.py')); print('X') # doctest: +ELLIPSIS
     X...
@@ -238,6 +239,7 @@
 A lower verbosity (one or more -q options) also quiets the warning.
 
     >>> bprint(system(buildout + ' -q'))
+    <BLANKLINE>
 
 Notice that, as we saw before with bin/buildout, the generated scripts
 are old-style, because the new-style feature gracefully degrades to the

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt	2010-11-24 13:54:15 UTC (rev 118558)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt	2010-11-24 14:16:07 UTC (rev 118559)
@@ -27,7 +27,7 @@
     ...
     ...         name = os.path.join (self.location, 'readonly.txt')
     ...         open (name, 'w').write ('this is a read only file')
-    ...         os.chmod (name, 0400)
+    ...         os.chmod (name, 256) # 256 = 0400 octal
     ...         return ()
     ...
     ...     update = install



More information about the checkins mailing list