[Checkins] SVN: z3c.recipe.dev/trunk/ merged branch which aimed in getting the test running on unix systems, too
Michael Howitz
mh at gocept.com
Thu Aug 19 02:47:25 EDT 2010
Log message for revision 115770:
merged branch which aimed in getting the test running on unix systems, too
Changed:
U z3c.recipe.dev/trunk/CHANGES.txt
A z3c.recipe.dev/trunk/COPYRIGHT.txt
A z3c.recipe.dev/trunk/LICENSE.txt
U z3c.recipe.dev/trunk/bootstrap.py
U z3c.recipe.dev/trunk/src/z3c/__init__.py
U z3c.recipe.dev/trunk/src/z3c/recipe/__init__.py
U z3c.recipe.dev/trunk/src/z3c/recipe/dev/README.txt
U z3c.recipe.dev/trunk/src/z3c/recipe/dev/tests.py
-=-
Modified: z3c.recipe.dev/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.dev/trunk/CHANGES.txt 2010-08-19 06:45:25 UTC (rev 115769)
+++ z3c.recipe.dev/trunk/CHANGES.txt 2010-08-19 06:47:24 UTC (rev 115770)
@@ -5,9 +5,13 @@
0.5.5dev (unreleased)
---------------------
-- added support for environment
+- Added support for environment.
+- Fixed tests to run with current package versions.
+- Fixed tests to run on *nix systems (not only win).
+
+
0.5.4 (2009-02-22)
------------------
Copied: z3c.recipe.dev/trunk/COPYRIGHT.txt (from rev 115648, z3c.recipe.dev/branches/icemac-unix/COPYRIGHT.txt)
===================================================================
--- z3c.recipe.dev/trunk/COPYRIGHT.txt (rev 0)
+++ z3c.recipe.dev/trunk/COPYRIGHT.txt 2010-08-19 06:47:24 UTC (rev 115770)
@@ -0,0 +1 @@
+Zope Foundation and Contributors
\ No newline at end of file
Copied: z3c.recipe.dev/trunk/LICENSE.txt (from rev 115648, z3c.recipe.dev/branches/icemac-unix/LICENSE.txt)
===================================================================
--- z3c.recipe.dev/trunk/LICENSE.txt (rev 0)
+++ z3c.recipe.dev/trunk/LICENSE.txt 2010-08-19 06:47:24 UTC (rev 115770)
@@ -0,0 +1,44 @@
+Zope Public License (ZPL) Version 2.1
+
+A copyright notice accompanies this license document that identifies the
+copyright holders.
+
+This license has been certified as open source. It has also been designated as
+GPL compatible by the Free Software Foundation (FSF).
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions in source code must retain the accompanying copyright
+notice, this list of conditions, and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the accompanying copyright
+notice, this list of conditions, and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+3. Names of the copyright holders must not be used to endorse or promote
+products derived from this software without prior written permission from the
+copyright holders.
+
+4. The right to distribute this software or to use it for any purpose does not
+give you the right to use Servicemarks (sm) or Trademarks (tm) of the
+copyright
+holders. Use of them is covered by separate agreement with the copyright
+holders.
+
+5. If any files are modified, you must cause the modified files to carry
+prominent notices stating that you changed the files and the date of any
+change.
+
+Disclaimer
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Modified: z3c.recipe.dev/trunk/bootstrap.py
===================================================================
--- z3c.recipe.dev/trunk/bootstrap.py 2010-08-19 06:45:25 UTC (rev 115769)
+++ z3c.recipe.dev/trunk/bootstrap.py 2010-08-19 06:47:24 UTC (rev 115770)
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2006 Zope Corporation and Contributors.
+# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
Modified: z3c.recipe.dev/trunk/src/z3c/__init__.py
===================================================================
--- z3c.recipe.dev/trunk/src/z3c/__init__.py 2010-08-19 06:45:25 UTC (rev 115769)
+++ z3c.recipe.dev/trunk/src/z3c/__init__.py 2010-08-19 06:47:24 UTC (rev 115770)
@@ -1,7 +1 @@
-# this is a namespace package
-try:
- import pkg_resources
- pkg_resources.declare_namespace(__name__)
-except ImportError:
- import pkgutil
- __path__ = pkgutil.extend_path(__path__, __name__)
+__import__('pkg_resources').declare_namespace(__name__)
Modified: z3c.recipe.dev/trunk/src/z3c/recipe/__init__.py
===================================================================
--- z3c.recipe.dev/trunk/src/z3c/recipe/__init__.py 2010-08-19 06:45:25 UTC (rev 115769)
+++ z3c.recipe.dev/trunk/src/z3c/recipe/__init__.py 2010-08-19 06:47:24 UTC (rev 115770)
@@ -1,6 +1 @@
-# namespace package boilerplate
-try:
- __import__('pkg_resources').declare_namespace(__name__)
-except ImportError, e:
- from pkgutil import extend_path
- __path__ = extend_path(__path__, __name__)
+__import__('pkg_resources').declare_namespace(__name__)
Modified: z3c.recipe.dev/trunk/src/z3c/recipe/dev/README.txt
===================================================================
--- z3c.recipe.dev/trunk/src/z3c/recipe/dev/README.txt 2010-08-19 06:45:25 UTC (rev 115769)
+++ z3c.recipe.dev/trunk/src/z3c/recipe/dev/README.txt 2010-08-19 06:47:24 UTC (rev 115770)
@@ -71,6 +71,7 @@
... [buildout]
... develop = demo1 demo2
... parts = myapp var
+ ... newest = false
...
... [myapp]
... recipe = z3c.recipe.dev:app
@@ -171,7 +172,7 @@
The myapp-scrip.py contains the start code for our zope setup:
- >>> cat('bin', 'myapp-script.py')
+ >>> cat('bin', 'myapp')
#!"C:\Python24\python.exe"
<BLANKLINE>
import sys
@@ -182,10 +183,11 @@
'/sample-buildout/eggs/zope.testing-3.7.1-py2.4.egg',
'/sample-buildout/eggs/zc.recipe.egg-1.1.0-py2.4.egg',
'/sample-buildout/eggs/zc.buildout-1.1.1-py2.4.egg',
- '/site-packages',
+ '/sample-pyN.N.egg',
'/sample-buildout/eggs/zconfig-2.6.1-py2.4.egg',
'/sample-buildout/demo1',
'/sample-buildout/eggs/zope.interface-3.5.0-py2.4-win32.egg',
+ '/sample-pyN.N.egg',
]
<BLANKLINE>
import os
@@ -249,7 +251,7 @@
>>> write('hello', 'setup.py',
... '''
... from setuptools import setup
- ... setup(name = 'hello')
+ ... setup(name='hello')
... ''')
And let's define a python module which we use for our test:
@@ -273,11 +275,12 @@
... [buildout]
... develop = hello
... parts = helloworld
+ ... newest = false
...
... [helloworld]
... recipe = z3c.recipe.dev:script
... eggs = hello
- ... module = hello.helloworld
+ ... module = helloworld
... method = helloWorld
...
... ''' % globals())
@@ -293,7 +296,7 @@
And check the script again. Now we see the `helloWorld()` method is used:
- >>> cat('bin', 'helloworld-script.py')
+ >>> cat('bin', 'helloworld')
#!C:\Python24\python.exe
<BLANKLINE>
import sys
@@ -305,10 +308,10 @@
sys.argv[0] = os.path.abspath(sys.argv[0])
<BLANKLINE>
<BLANKLINE>
- import hello.helloworld
+ import helloworld
<BLANKLINE>
if __name__ == '__main__':
- hello.helloworld.helloWorld()
+ helloworld.helloWorld()
Now we can call the script:
@@ -332,11 +335,12 @@
... [buildout]
... develop = hello
... parts = helloworld
+ ... newest = false
...
... [helloworld]
... recipe = z3c.recipe.dev:script
... eggs = hello
- ... module = hello.helloworld
+ ... module = helloworld
... method = helloWorld
... arguments = 'foo', 'bar'
...
@@ -352,7 +356,7 @@
And check the script again. Now we see the `helloWorld()` method is used:
- >>> cat('bin', 'helloworld-script.py')
+ >>> cat('bin', 'helloworld')
#!C:\Python24\python.exe
<BLANKLINE>
import sys
@@ -364,10 +368,10 @@
sys.argv[0] = os.path.abspath(sys.argv[0])
<BLANKLINE>
<BLANKLINE>
- import hello.helloworld
+ import helloworld
<BLANKLINE>
if __name__ == '__main__':
- hello.helloworld.helloWorld('foo', 'bar')
+ helloworld.helloWorld('foo', 'bar')
Now we can call the script:
@@ -385,6 +389,7 @@
... [buildout]
... parts = data-dir
... find-links = http://download.zope.org/distribution
+ ... newest = false
...
... [data-dir]
... recipe = z3c.recipe.dev:mkdir
@@ -414,6 +419,7 @@
... [buildout]
... parts = data-dir
... find-links = http://download.zope.org/distribution
+ ... newest = false
...
... [data-dir]
... recipe = z3c.recipe.dev:mkdir
@@ -444,6 +450,7 @@
... [buildout]
... parts = data-dir
... find-links = http://download.zope.org/distribution
+ ... newest = false
...
... [data-dir]
... recipe = z3c.recipe.dev:mkdir
@@ -464,6 +471,7 @@
... [buildout]
... parts = data-dir
... find-links = http://download.zope.org/distribution
+ ... newest = false
...
... [data-dir]
... recipe = z3c.recipe.dev:mkdir
@@ -500,6 +508,7 @@
... """
... [buildout]
... parts = script
+ ... newest = false
...
... [script]
... recipe = z3c.recipe.dev:mkfile
@@ -549,6 +558,7 @@
... """
... [buildout]
... parts = script
+ ... newest = false
...
... [script]
... recipe = z3c.recipe.dev:mkfile
@@ -583,6 +593,7 @@
... """
... [buildout]
... parts = script
+ ... newest = false
...
... [script]
... recipe = z3c.recipe.dev:mkfile
Modified: z3c.recipe.dev/trunk/src/z3c/recipe/dev/tests.py
===================================================================
--- z3c.recipe.dev/trunk/src/z3c/recipe/dev/tests.py 2010-08-19 06:45:25 UTC (rev 115769)
+++ z3c.recipe.dev/trunk/src/z3c/recipe/dev/tests.py 2010-08-19 06:47:24 UTC (rev 115770)
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2006 Zope Corporation and Contributors.
+# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
@@ -12,16 +12,13 @@
#
##############################################################################
-import os, re, shutil, sys, tempfile
-import pkg_resources
-
+from zope.testing import renormalizing
+import doctest
+import re
+import unittest
import zc.buildout.testing
-import unittest
-import zope.testing
-from zope.testing import doctest, renormalizing
-
def test_start_error():
"""The start script will setup a egg based start hook for a Zope 3 setup.
Let's create a buildout that installs it as an ordinary script:
@@ -44,6 +41,7 @@
zc.buildout.testing.install_develop('z3c.recipe.dev', test)
zc.buildout.testing.install('zope.testing', test)
zc.buildout.testing.install('zope.interface', test)
+ zc.buildout.testing.install('zope.exceptions', test)
zc.buildout.testing.install('zc.recipe.egg', test)
zc.buildout.testing.install('ZConfig', test)
zc.buildout.testing.install('zc.recipe.filestorage', test)
@@ -64,6 +62,7 @@
(re.compile('-\S+-py\d[.]\d(-\S+)?.egg'),
'-pyN.N.egg',
),
+ (re.compile('install_dir .*'), ''),
zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_script,
zc.buildout.testing.normalize_egg_py,
@@ -72,11 +71,9 @@
def test_suite():
return unittest.TestSuite(
- doctest.DocFileSuite('README.txt',
+ doctest.DocFileSuite(
+ 'README.txt',
setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
+ optionflags=doctest.NORMALIZE_WHITESPACE,
checker=checker),
)
-
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
More information about the checkins
mailing list