[Checkins] SVN: z3c.testing/trunk/ version bump, added changes.txt, fixed a bug in appsetup of layer, see changes.txt

Bernd Dorn bernd.dorn at lovelysystems.com
Thu Jun 21 05:52:55 EDT 2007


Log message for revision 76884:
  version bump, added changes.txt, fixed a bug in appsetup of layer, see changes.txt

Changed:
  A   z3c.testing/trunk/CHANGES.txt
  D   z3c.testing/trunk/setup.cfg
  U   z3c.testing/trunk/setup.py
  U   z3c.testing/trunk/src/z3c/__init__.py
  U   z3c.testing/trunk/src/z3c/testing/layer.py

-=-
Added: z3c.testing/trunk/CHANGES.txt
===================================================================
--- z3c.testing/trunk/CHANGES.txt	                        (rev 0)
+++ z3c.testing/trunk/CHANGES.txt	2007-06-21 09:52:54 UTC (rev 76884)
@@ -0,0 +1,10 @@
+=======================
+Changes for z3c.testing
+=======================
+
+After initial release
+=====================
+
+- make z3c a namespace
+
+- prevent ConnectionStateError in layer after appsetup is run in layer


Property changes on: z3c.testing/trunk/CHANGES.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Deleted: z3c.testing/trunk/setup.cfg
===================================================================
--- z3c.testing/trunk/setup.cfg	2007-06-21 09:40:21 UTC (rev 76883)
+++ z3c.testing/trunk/setup.cfg	2007-06-21 09:52:54 UTC (rev 76884)
@@ -1,2 +0,0 @@
-[egg_info]
-tag_svn_revision = 1

Modified: z3c.testing/trunk/setup.py
===================================================================
--- z3c.testing/trunk/setup.py	2007-06-21 09:40:21 UTC (rev 76883)
+++ z3c.testing/trunk/setup.py	2007-06-21 09:52:54 UTC (rev 76884)
@@ -2,7 +2,7 @@
 from setuptools import setup, find_packages
 
 setup(name='z3c.testing',
-      version='0.1',
+      version='0.1.1a1',
       author = "Zope Community",
       author_email = "zope3-dev at zope.org",
       description = "Test Helpers for Zope3",

Modified: z3c.testing/trunk/src/z3c/__init__.py
===================================================================
--- z3c.testing/trunk/src/z3c/__init__.py	2007-06-21 09:40:21 UTC (rev 76883)
+++ z3c.testing/trunk/src/z3c/__init__.py	2007-06-21 09:52:54 UTC (rev 76884)
@@ -1,17 +1,5 @@
-##############################################################################
-#
-# Copyright (c) 2005 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-$Id$
-"""
-
+# this is a namespace package
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    pass

Modified: z3c.testing/trunk/src/z3c/testing/layer.py
===================================================================
--- z3c.testing/trunk/src/z3c/testing/layer.py	2007-06-21 09:40:21 UTC (rev 76883)
+++ z3c.testing/trunk/src/z3c/testing/layer.py	2007-06-21 09:52:54 UTC (rev 76884)
@@ -29,6 +29,7 @@
 from zope.app.testing import functional
 from zope.app.publication.zopepublication import ZopePublication
 import sys
+from zope.app.component import hooks
 
 class BufferedDatabaseTestLayer(object):
     """A test layer which creates a filestorage database.
@@ -70,11 +71,14 @@
             connection = db.open()
             root = connection.root()
             app = root[ZopePublication.root_name]
+            # store the site, because the connection gets closed
+            site = hooks.getSite()
             self.setUpApplication(app)
             transaction.commit()
             connection.close()
             db.close()
-
+            hooks.setSite(site)
+            
         # sets up the db stuff normal
         fsetup.setUp()
         # replace the storage with our filestorage
@@ -92,6 +96,11 @@
         # can do what it wants with it
         fsetup.base_storage = self.original
         fsetup.tearDown()
+
+        #fsetup._config_file = False
+        #fsetup._database_names = None
+        #fsetup._init = False
+
         fsetup.tearDownCompletely()
 
 



More information about the Checkins mailing list