[Checkins] SVN: z3c.recipe.paster/trunk/ - Updated tests, so they work with current packages.

Michael Howitz mh at gocept.com
Mon Apr 20 12:48:15 EDT 2009


Log message for revision 99329:
  - Updated tests, so they work with current packages.
  
  - Fixed tests, so they should run both an Windows-like and Unix-like
    OS.
  
  

Changed:
  U   z3c.recipe.paster/trunk/CHANGES.txt
  U   z3c.recipe.paster/trunk/setup.py
  U   z3c.recipe.paster/trunk/src/z3c/recipe/paster/README.txt
  U   z3c.recipe.paster/trunk/src/z3c/recipe/paster/paster.txt
  U   z3c.recipe.paster/trunk/src/z3c/recipe/paster/tests.py

-=-
Modified: z3c.recipe.paster/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.paster/trunk/CHANGES.txt	2009-04-20 16:46:51 UTC (rev 99328)
+++ z3c.recipe.paster/trunk/CHANGES.txt	2009-04-20 16:48:14 UTC (rev 99329)
@@ -5,8 +5,11 @@
 0.5.1dev (unreleased)
 ---------------------
 
-- ...
+- Updated tests, so they work with current packages.
 
+- Fixed tests, so they should run both an Windows-like and Unix-like
+  OS.
+
 0.5.0 (2009-02-22)
 ------------------
 

Modified: z3c.recipe.paster/trunk/setup.py
===================================================================
--- z3c.recipe.paster/trunk/setup.py	2009-04-20 16:46:51 UTC (rev 99328)
+++ z3c.recipe.paster/trunk/setup.py	2009-04-20 16:48:14 UTC (rev 99329)
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2007 Zope Foundation and Contributors.
+# Copyright (c) 2007-2009 Zope Foundation and Contributors.
 # All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,

Modified: z3c.recipe.paster/trunk/src/z3c/recipe/paster/README.txt
===================================================================
--- z3c.recipe.paster/trunk/src/z3c/recipe/paster/README.txt	2009-04-20 16:46:51 UTC (rev 99328)
+++ z3c.recipe.paster/trunk/src/z3c/recipe/paster/README.txt	2009-04-20 16:48:14 UTC (rev 99329)
@@ -3,7 +3,7 @@
 =======================
 
 This Zope 3 recipes offers a Paste Deploy setup for Zope3 projects. It requires
-to define a Paste Deploy *.ini file in the buoldout.cfg. If you need a simple 
+to define a Paste Deploy *.ini file in the buoldout.cfg. If you need a simple
 PasteScript setup you can use the z3c.recipe.paster:paster recipe which allows
 to run already existing ``*.ini`` files.
 
@@ -43,8 +43,7 @@
 Now check if the setup was correct:
 
   >>> ls('bin')
-  -  buildout-script.py
-  -  buildout.exe
+  -  buildout
 
 We'll create a ``buildout.cfg`` file that defines our paster serve configuration:
 
@@ -53,26 +52,26 @@
   ... [buildout]
   ... develop = demo
   ... parts = var myapp
-  ... 
+  ...
   ... [var]
   ... recipe = zc.recipe.filestorage
-  ... 
+  ...
   ... [myapp]
   ... eggs = demo
   ... recipe = z3c.recipe.paster:serve
-  ... ini = 
+  ... ini =
   ...   [app:main]
   ...   use = egg:demo
-  ...   
+  ...
   ...   [server:main]
   ...   use = egg:Paste#http
   ...   host = 127.0.0.1
   ...   port = 8080
-  ... 
+  ...
   ... zope.conf =
-  ...   
+  ...
   ...   ${var:zconfig}
-  ...   
+  ...
   ...   <eventlog>
   ...     <logfile>
   ...       formatter zope.exceptions.log.Formatter
@@ -83,14 +82,14 @@
   ...       path STDOUT
   ...     </logfile>
   ...   </eventlog>
-  ...  
+  ...
   ...  devmode on
   ...
-  ... site.zcml = 
+  ... site.zcml =
   ...   <!-- inlcude other zcml files like principals.zcml or securitypolicy.zcml
   ...        and your app configuration -->
   ...   <include package="demo" file="app.zcml" />
-  ...  
+  ...
   ... ''' % globals())
 
 Now, Let's run the buildout and see what we get:
@@ -105,15 +104,13 @@
 server:
 
   >>> ls('bin')
-  -  buildout-script.py
-  -  buildout.exe
-  -  myapp-script.py
-  -  myapp.exe
+  -  buildout
+  -  myapp
 
-Check the content of our new generated myapp script. As you can see, the 
+Check the content of our new generated myapp script. As you can see, the
 generated script uses the ``paste.script.command.run`` for starting our server:
 
-  >>> cat('bin', 'myapp-script.py')
+  >>> cat('bin', 'myapp')
   #!"C:\Python24\python.exe"
   <BLANKLINE>
   import sys
@@ -148,7 +145,7 @@
 -----------
 
 As you probably know, there is some magic going on during startup. The section
-``app:main`` in the myapp.ini file above must be defined as entry_point in your 
+``app:main`` in the myapp.ini file above must be defined as entry_point in your
 projects setup.py file. Without them, the ``app:main`` isn't available. You can
 define such a app:main entry point using the default ``application_factory``
 offered from the ``z3c.recipe.paster.wsgi`` package. Of corse you can define
@@ -173,4 +170,4 @@
           main = z3c.recipe.paster.wsgi:application_factory
           """,
   )
-  
+

Modified: z3c.recipe.paster/trunk/src/z3c/recipe/paster/paster.txt
===================================================================
--- z3c.recipe.paster/trunk/src/z3c/recipe/paster/paster.txt	2009-04-20 16:46:51 UTC (rev 99328)
+++ z3c.recipe.paster/trunk/src/z3c/recipe/paster/paster.txt	2009-04-20 16:48:14 UTC (rev 99329)
@@ -4,13 +4,13 @@
 
 This Zope 3 recipes offers a Paste Deploy script setup for Zope3 projects.
 
-The paster part allows us to setup a plain paster executable which could be 
+The paster part allows us to setup a plain paster executable which could be
 used for start up your zope server using the paste deploy ".ini file like:
 ``bin/paster serve app.ini``. This recipe inherits the zc.recipe.egg class
 and will setup the paster within your egg dependency. All you have to do is
 to define your eggs. The benefit of this recipe compared with the built in
-PasteScript it the option to choose another name if you need more then one 
-paster script. This is required if you have paster with different egg 
+PasteScript it the option to choose another name if you need more then one
+paster script. This is required if you have paster with different egg
 dependencies in one buildout configuration.
 
 
@@ -59,11 +59,11 @@
   ... [buildout]
   ... develop = sample
   ... parts = mypaster
-  ... 
+  ...
   ... [mypaster]
   ... recipe = z3c.recipe.paster:paster
   ... eggs = sample
-  ...  
+  ...
   ... ''' % globals())
 
   >>> ls('bin')
@@ -85,19 +85,18 @@
   -  mypaster-script.py
   -  mypaster.exe
 
-Check the content of our new generated paster script. As you can see, the 
+Check the content of our new generated paster script. As you can see, the
 generated script uses the ``paste.script.command.run`` for starting our server.
 This script is generic but uses the path of our eggs and uses the given name:
 
-  >>> cat('bin', 'mypaster-script.py')
+  >>> cat('bin', 'mypaster')
   <BLANKLINE>
   import sys
   sys.path[0:0] = [
     '/sample-buildout/sample',
     '/sample-pyN.N.egg',
-    'c:\\python24\\lib\\site-packages',
+    ...
     '/sample-pyN.N.egg',
-    '/sample-pyN.N.egg',
     ]
   <BLANKLINE>
   import paste.script.command

Modified: z3c.recipe.paster/trunk/src/z3c/recipe/paster/tests.py
===================================================================
--- z3c.recipe.paster/trunk/src/z3c/recipe/paster/tests.py	2009-04-20 16:46:51 UTC (rev 99328)
+++ z3c.recipe.paster/trunk/src/z3c/recipe/paster/tests.py	2009-04-20 16:48:14 UTC (rev 99329)
@@ -43,7 +43,10 @@
     zc.buildout.testing.install('zope.annotation', test)
     zc.buildout.testing.install('zope.app.applicationcontrol', test)
     zc.buildout.testing.install('zope.app.appsetup', test)
-    zc.buildout.testing.install('zope.app.authentication', test)
+    zc.buildout.testing.install('zope.authentication', test)
+    zc.buildout.testing.install('zope.principalregistry', test)
+    zc.buildout.testing.install('zope.app.localpermission', test)
+    zc.buildout.testing.install('zope.password', test)
     zc.buildout.testing.install('zope.app.basicskin', test)
     zc.buildout.testing.install('zope.app.component', test)
     zc.buildout.testing.install('zope.app.container', test)
@@ -107,9 +110,10 @@
     (re.compile("""['"][^\n"']+z3c.recipe.paster[^\n"']*['"],"""),
      "'/z3c.recipe.paster',"),
     (re.compile('#![^\n]+\n'), ''),
-    (re.compile('-\S+-py\d[.]\d(-\S+)?.egg'),
-     '-pyN.N.egg',
-    ),
+    (re.compile('-\S+-py\d[.]\d(-\S+)?.egg'), '-pyN.N.egg'),
+    # the following are for compatibility with Windows
+    (re.compile('-  .*\.exe\n'), ''),
+    (re.compile('-script.py'), ''),
     ])
 
 



More information about the Checkins mailing list