[Checkins] SVN: zc.sourcerelease/trunk/ Reveal again the tests hidden in previous revision (r121554).

Zvezdan Petkovic zvezdan at zope.com
Thu May 5 14:34:01 EDT 2011


Log message for revision 121556:
  Reveal again the tests hidden in previous revision (r121554).
  
  - Pin the versions of zc.buildout and dependent packages because one of the
    tests does not work with zc.buildout >=1.5.0
  - Use re-normalizer regex appropriately: avoid plain strings and non-raw
    strings with backslashes in them.
  - Avoid hiding the test intentions by stripping output in re-normalizer.
    Add the test change instead.
  
  

Changed:
  U   zc.sourcerelease/trunk/buildout.cfg
  U   zc.sourcerelease/trunk/src/zc/sourcerelease/CHANGES.txt
  U   zc.sourcerelease/trunk/src/zc/sourcerelease/README.txt
  U   zc.sourcerelease/trunk/src/zc/sourcerelease/tests.py

-=-
Modified: zc.sourcerelease/trunk/buildout.cfg
===================================================================
--- zc.sourcerelease/trunk/buildout.cfg	2011-05-05 07:19:17 UTC (rev 121555)
+++ zc.sourcerelease/trunk/buildout.cfg	2011-05-05 18:34:00 UTC (rev 121556)
@@ -1,12 +1,18 @@
 [buildout]
 develop = .
 parts = script test
+versions = versions
 
+[versions]
+setuptools = 0.6c11
+zc.buildout = 1.4.3
+zc.recipe.egg = 1.2.2
+zc.recipe.testrunner = 1.3.0
+
 [test]
 recipe = zc.recipe.testrunner
 eggs = zc.sourcerelease [test]
 
-
 [script]
 recipe = zc.recipe.egg
 eggs = zc.sourcerelease

Modified: zc.sourcerelease/trunk/src/zc/sourcerelease/CHANGES.txt
===================================================================
--- zc.sourcerelease/trunk/src/zc/sourcerelease/CHANGES.txt	2011-05-05 07:19:17 UTC (rev 121555)
+++ zc.sourcerelease/trunk/src/zc/sourcerelease/CHANGES.txt	2011-05-05 18:34:00 UTC (rev 121556)
@@ -4,12 +4,12 @@
 0.3.2 (unreleased)
 ------------------
 
-* Made tests compatible with distribute.
+- Made tests compatible with distribute.
+- Added test extra to declare test dependency on `zope.testing`.
+- One test currently fails with `zc.buildout` >=1.5.0.
+  So the versions of packages that depend on it are pinned.
 
-* Added test extra to declare test dependency on ``zope.testing``.
 
-
-
 0.3.1 (2009-09-25)
 ------------------
 

Modified: zc.sourcerelease/trunk/src/zc/sourcerelease/README.txt
===================================================================
--- zc.sourcerelease/trunk/src/zc/sourcerelease/README.txt	2011-05-05 07:19:17 UTC (rev 121555)
+++ zc.sourcerelease/trunk/src/zc/sourcerelease/README.txt	2011-05-05 18:34:00 UTC (rev 121556)
@@ -46,7 +46,13 @@
 Let's look at an example.  We have a server with some distributions on
 it.
 
-    >>> print get(link_server),
+    >>> index_content = get(link_server)
+    >>> if 'distribute' in index_content:
+    ...     lines = index_content.splitlines()
+    ...     distribute_line = lines.pop(1)
+    ...     lines.insert(4, distribute_line)
+    ...     index_content = '\n'.join(lines)
+    >>> print index_content,
     <html><body>
     <a href="index/">index/</a><br>
     <a href="sample1-1.0.zip">sample1-1.0.zip</a><br>
@@ -81,7 +87,6 @@
     ... # doctest: +ELLIPSIS
     Creating source release in sample.tgz
     ...
-    Generated script '...sample1'.
 
 We end up with a tar file:
 
@@ -154,9 +159,10 @@
 It has a release-distributions directory containing distributions
 needed to install the buildout:
 
-    >>> ls('test', 'sample', 'release-distributions', 'dist') # doctest: +ELLIPSIS
+    >>> ls('test', 'sample', 'release-distributions', 'dist')
     -  sample1-1.0.zip
-    -  sample2-1.0.zip...
+    -  sample2-1.0.zip
+    -  zc.buildout-99.99-pyN.N.egg
     -  zc.recipe.egg-1.0.0b6-py2.4.egg
 
 (There normally aren't distributions for buildout and setuptools, etc.

Modified: zc.sourcerelease/trunk/src/zc/sourcerelease/tests.py
===================================================================
--- zc.sourcerelease/trunk/src/zc/sourcerelease/tests.py	2011-05-05 07:19:17 UTC (rev 121555)
+++ zc.sourcerelease/trunk/src/zc/sourcerelease/tests.py	2011-05-05 18:34:00 UTC (rev 121556)
@@ -126,18 +126,16 @@
 def test_suite():
     return unittest.TestSuite((
         doctest.DocFileSuite(
-        'README.txt',
-        setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
-        checker=renormalizing.RENormalizing([
-               zc.buildout.testing.normalize_path,
-               zc.buildout.testing.normalize_egg_py,
-                (re.compile('-\S+-py'), ''),
-                # support both distribute and setuptools:
-                (re.compile('<a href="distributeN.N.egg</a><br>\n'), ''),
-                (re.compile('<a href="setuptoolsN.N.egg</a><br>\n'), ''),
-                (re.compile('d  distributeN.N.egg'), '-  setuptoolsN.N.egg'),
-               ]),
-        ),
+            'README.txt',
+            setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
+            checker=renormalizing.RENormalizing([
+                (re.compile(r'distribute(-?(?:\w|[.-])+\.egg)'),
+                    r'setuptools\1'),
+                zc.buildout.testing.normalize_path,
+                zc.buildout.testing.normalize_egg_py,
+                (re.compile(r'-\S+-py'), ''),
+                ]),
+            ),
         ))
 
 if __name__ == '__main__':



More information about the checkins mailing list