[Checkins] SVN: zc.buildout/branch/regebro-python3/src/zc/buildout/ Well....NOTHING works so far. Not sure about this experiment. I hate doctests.

Lennart Regebro regebro at gmail.com
Fri Apr 16 11:54:08 EDT 2010


Log message for revision 110980:
  Well....NOTHING works so far. Not sure about this experiment. I hate doctests.
  

Changed:
  U   zc.buildout/branch/regebro-python3/src/zc/buildout/repeatable.txt
  U   zc.buildout/branch/regebro-python3/src/zc/buildout/runsetup.txt
  U   zc.buildout/branch/regebro-python3/src/zc/buildout/setup.txt
  U   zc.buildout/branch/regebro-python3/src/zc/buildout/testing.py
  U   zc.buildout/branch/regebro-python3/src/zc/buildout/tests.py

-=-
Modified: zc.buildout/branch/regebro-python3/src/zc/buildout/repeatable.txt
===================================================================
--- zc.buildout/branch/regebro-python3/src/zc/buildout/repeatable.txt	2010-04-16 15:24:50 UTC (rev 110979)
+++ zc.buildout/branch/regebro-python3/src/zc/buildout/repeatable.txt	2010-04-16 15:54:07 UTC (rev 110980)
@@ -39,7 +39,7 @@
 
     >>> write('recipe', 'README', '')
 
-    >>> print(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
+    >>> print(system(buildout+' setup recipe bdist_egg').decode(), end=' ') # doctest: +ELLIPSIS
     Running setup script 'recipe/setup.py'.
     ...
 

Modified: zc.buildout/branch/regebro-python3/src/zc/buildout/runsetup.txt
===================================================================
--- zc.buildout/branch/regebro-python3/src/zc/buildout/runsetup.txt	2010-04-16 15:24:50 UTC (rev 110979)
+++ zc.buildout/branch/regebro-python3/src/zc/buildout/runsetup.txt	2010-04-16 15:54:07 UTC (rev 110980)
@@ -32,7 +32,7 @@
   
 We can use the buildout command to generate the hello egg:
 
-    >>> print(system(buildout +' setup hello -q bdist_egg'), end=' ')
+    >>> print(system(buildout +' setup hello -q bdist_egg').decode(), end=' ')
     Running setup script 'hello/setup.py'.
     zip_safe flag not set; analyzing archive contents...
 

Modified: zc.buildout/branch/regebro-python3/src/zc/buildout/setup.txt
===================================================================
--- zc.buildout/branch/regebro-python3/src/zc/buildout/setup.txt	2010-04-16 15:24:50 UTC (rev 110979)
+++ zc.buildout/branch/regebro-python3/src/zc/buildout/setup.txt	2010-04-16 15:54:07 UTC (rev 110980)
@@ -28,7 +28,7 @@
 doesn't import setuptools.  Let's try running it to create an egg.
 We'll use the buildout script from our sample buildout:
 
-    >>> print(system(buildout+' setup'), end=" ")
+    >>> print(system(buildout+' setup').decode(), end=" ")
     ... # doctest: +NORMALIZE_WHITESPACE
     Error: The setup command requires the path to a setup script or
     directory containing a setup script, and its arguments.

Modified: zc.buildout/branch/regebro-python3/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/branch/regebro-python3/src/zc/buildout/testing.py	2010-04-16 15:24:50 UTC (rev 110979)
+++ zc.buildout/branch/regebro-python3/src/zc/buildout/testing.py	2010-04-16 15:54:07 UTC (rev 110980)
@@ -483,6 +483,7 @@
         destination = os.path.join(destination.globs['sample_buildout'],
                                    'develop-eggs')
 
+    import pdb;pdb.set_trace()
     dist = pkg_resources.working_set.find(
         pkg_resources.Requirement.parse(project))
     open(os.path.join(destination, project+'.egg-link'), 'w'

Modified: zc.buildout/branch/regebro-python3/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branch/regebro-python3/src/zc/buildout/tests.py	2010-04-16 15:24:50 UTC (rev 110979)
+++ zc.buildout/branch/regebro-python3/src/zc/buildout/tests.py	2010-04-16 15:54:07 UTC (rev 110980)
@@ -2024,11 +2024,14 @@
     >>> src = tmpdir('src')
     >>> write(src, 'wacky_handler.py',
     ... '''
-    ... import urllib2
-    ... class Wacky(urllib2.HTTPHandler):
-    ...     wacky_open = urllib2.HTTPHandler.http_open
+    ... try:
+    ...     from urllib2 import install_opener, build_opener, HTTPHandler
+    ... except: # Python 3
+    ...     from urllib.request import urlopen
+    ... class Wacky(HTTPHandler):
+    ...     wacky_open = HTTPHandler.http_open
     ... def install(buildout=None):
-    ...     urllib2.install_opener(urllib2.build_opener(Wacky))
+    ...     install_opener(build_opener(Wacky))
     ... ''')
     >>> write(src, 'setup.py',
     ... '''
@@ -2859,17 +2862,20 @@
             'buildout.txt', 'runsetup.txt', 'repeatable.txt', 'setup.txt',
             setUp=zc.buildout.testing.buildoutSetUp,
             tearDown=zc.buildout.testing.buildoutTearDown,
+            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE,
             ),
         doctest.DocFileSuite(
             'debugging.txt',
             setUp=zc.buildout.testing.buildoutSetUp,
             tearDown=zc.buildout.testing.buildoutTearDown,
+            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE,
             ),
 
         doctest.DocFileSuite(
             'update.txt',
             setUp=updateSetup,
             tearDown=zc.buildout.testing.buildoutTearDown,
+            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE,
             ),
 
         doctest.DocFileSuite(
@@ -2877,21 +2883,25 @@
             'allowhosts.txt', 'unzip.txt', 'upgrading_distribute.txt',
             setUp=easy_install_SetUp,
             tearDown=zc.buildout.testing.buildoutTearDown,
+            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE,
             ),
 
         doctest.DocFileSuite(
             'download.txt', 'extends-cache.txt',
             setUp=easy_install_SetUp,
             tearDown=zc.buildout.testing.buildoutTearDown,
-            optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
+            optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS | doctest.REPORT_ONLY_FIRST_FAILURE,
             ),
 
         doctest.DocTestSuite(
             setUp=easy_install_SetUp,
             tearDown=zc.buildout.testing.buildoutTearDown,
+            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE,
             ),
         doctest.DocFileSuite(
-            'testing_bugfix.txt'),
+            'testing_bugfix.txt',
+            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE,
+            ),
     ]
 
     # adding bootstrap.txt doctest to the suite



More information about the checkins mailing list