[Checkins] SVN: gocept.selenium/trunk/ use plone.testing as it allows to run zope2 and plone tests together

Godefroid Chapelle gotcha at bubblenet.be
Wed Oct 20 03:49:52 EDT 2010


Log message for revision 117792:
  use plone.testing as it allows to run zope2 and plone tests together
  

Changed:
  D   gocept.selenium/trunk/plone4-plone.testing.cfg
  A   gocept.selenium/trunk/plonetesting.cfg
  D   gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4plonetesting/
  A   gocept.selenium/trunk/src/gocept/selenium/plone/tests/plonetesting/
  U   gocept.selenium/trunk/src/gocept/selenium/plone/tests/plonetesting/test_plone4.py
  A   gocept.selenium/trunk/src/gocept/selenium/zope2/plonetesting.py
  A   gocept.selenium/trunk/src/gocept/selenium/zope2/tests/plonetesting/
  U   gocept.selenium/trunk/src/gocept/selenium/zope2/tests/plonetesting/test_zope212.py

-=-
Deleted: gocept.selenium/trunk/plone4-plone.testing.cfg
===================================================================
--- gocept.selenium/trunk/plone4-plone.testing.cfg	2010-10-20 07:49:11 UTC (rev 117791)
+++ gocept.selenium/trunk/plone4-plone.testing.cfg	2010-10-20 07:49:52 UTC (rev 117792)
@@ -1,33 +0,0 @@
-[buildout]
-extensions = mr.developer
-extends = http://dist.plone.org/release/4.0-latest/versions.cfg
-develop = .
-parts = instance test omelette
-package = gocept.selenium
-find-links = http://download.gocept.com/packages
-versions = versions
-sources-dir = devel
-
-[sources]
-plone.testing = svn https://svn.plone.org/svn/plone/plone.testing/trunk
-
-[versions]
-PILwoTK = 1.1.6.4
-
-[test]
-recipe = zc.recipe.testrunner
-defaults = ["--ignore_dir=ztk", "--ignore_dir=zope",  "--ignore_dir=static", "--tests-pattern=plone4plonetesting"]
-eggs = ${instance:eggs}
-       plone.app.testing
-
-[instance]
-recipe = plone.recipe.zope2instance
-user = admin:admin
-eggs = ${buildout:package}
-    Plone
-    PILwoTK
-zcml = gocept.selenium.tests.fixture
-
-[omelette]
-recipe = collective.recipe.omelette
-eggs = ${test:eggs}

Copied: gocept.selenium/trunk/plonetesting.cfg (from rev 117763, gocept.selenium/trunk/plone4-plone.testing.cfg)
===================================================================
--- gocept.selenium/trunk/plonetesting.cfg	                        (rev 0)
+++ gocept.selenium/trunk/plonetesting.cfg	2010-10-20 07:49:52 UTC (rev 117792)
@@ -0,0 +1,33 @@
+[buildout]
+extensions = mr.developer
+extends = http://dist.plone.org/release/4.0-latest/versions.cfg
+develop = .
+parts = instance test omelette
+package = gocept.selenium
+find-links = http://download.gocept.com/packages
+versions = versions
+sources-dir = devel
+
+[sources]
+plone.testing = svn https://svn.plone.org/svn/plone/plone.testing/trunk
+
+[versions]
+PILwoTK = 1.1.6.4
+
+[test]
+recipe = zc.recipe.testrunner
+defaults = ["--ignore_dir=ztk", "--ignore_dir=static", "--tests-pattern=plonetesting"]
+eggs = ${instance:eggs}
+       plone.app.testing
+
+[instance]
+recipe = plone.recipe.zope2instance
+user = admin:admin
+eggs = ${buildout:package}
+    Plone
+    PILwoTK
+zcml = gocept.selenium.tests.fixture
+
+[omelette]
+recipe = collective.recipe.omelette
+eggs = ${test:eggs}

Modified: gocept.selenium/trunk/src/gocept/selenium/plone/tests/plonetesting/test_plone4.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4plonetesting/test_plone4.py	2010-10-19 13:59:18 UTC (rev 117763)
+++ gocept.selenium/trunk/src/gocept/selenium/plone/tests/plonetesting/test_plone4.py	2010-10-20 07:49:52 UTC (rev 117792)
@@ -14,7 +14,7 @@
 
 import unittest
 import gocept.selenium.zope2
-from gocept.selenium.zope2 import testing
+from gocept.selenium.zope2.plonetesting import ISOLATION
 import gocept.selenium.tests.isolation
 
 from plone.app.testing.layers import PLONE_FIXTURE
@@ -25,7 +25,7 @@
 class Plone4Tests(gocept.selenium.tests.isolation.IsolationTests,
                  gocept.selenium.plone.TestCase):
 
-    layer = gocept.selenium.zope2.Layer(PLONE_FIXTURE, testing.isolationLayer)
+    layer = gocept.selenium.zope2.Layer(PLONE_FIXTURE, ISOLATION)
 
     def test_plone_login(self):
         sel = self.selenium

Copied: gocept.selenium/trunk/src/gocept/selenium/zope2/plonetesting.py (from rev 117760, gocept.selenium/trunk/src/gocept/selenium/zope2/testing.py)
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/zope2/plonetesting.py	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/zope2/plonetesting.py	2010-10-20 07:49:52 UTC (rev 117792)
@@ -0,0 +1,17 @@
+from zope.configuration import xmlconfig
+
+from plone.testing import Layer
+from plone.testing.z2 import STARTUP
+
+from gocept.selenium import zope2
+
+
+class Isolation(Layer):
+
+    defaultBases = (STARTUP,)
+
+    def setUp(self):
+        context = self['configurationContext']
+        xmlconfig.file('testing.zcml', package=zope2, context=context)
+
+ISOLATION = Isolation()

Modified: gocept.selenium/trunk/src/gocept/selenium/zope2/tests/plonetesting/test_zope212.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope212/test_zope212.py	2010-10-19 13:29:18 UTC (rev 117760)
+++ gocept.selenium/trunk/src/gocept/selenium/zope2/tests/plonetesting/test_zope212.py	2010-10-20 07:49:52 UTC (rev 117792)
@@ -14,18 +14,14 @@
 
 import unittest
 import gocept.selenium.zope2
-from gocept.selenium.zope2 import testing
-from gocept.selenium.zope2 import BASE_LAYERS
+from gocept.selenium.zope2 import plonetesting
 import gocept.selenium.tests.isolation
-import Testing.ZopeTestCase
 
-Testing.ZopeTestCase.installProduct('Five')
 
-
 class Zope212Tests(gocept.selenium.tests.isolation.IsolationTests,
                  gocept.selenium.zope2.TestCase):
 
-    layer = gocept.selenium.zope2.Layer(testing.isolationLayer, *BASE_LAYERS)
+    layer = gocept.selenium.zope2.Layer(plonetesting.ISOLATION)
 
 
 def test_suite():



More information about the checkins mailing list