[Checkins] SVN: lovely.viewcache/trunk/ - buildoutify/eggify
Fred L. Drake, Jr.
fdrake at gmail.com
Thu Mar 22 11:52:40 EDT 2007
Log message for revision 73457:
- buildoutify/eggify
- move harness for all tests to tests.py
- avoid deprecation warning for ZCML including zope.app package directly
Changed:
_U lovely.viewcache/trunk/
A lovely.viewcache/trunk/buildout.cfg
A lovely.viewcache/trunk/setup.cfg
A lovely.viewcache/trunk/setup.py
A lovely.viewcache/trunk/src/lovely/__init__.py
U lovely.viewcache/trunk/src/lovely/viewcache/ftesting.zcml
D lovely.viewcache/trunk/src/lovely/viewcache/ftests.py
U lovely.viewcache/trunk/src/lovely/viewcache/tests.py
-=-
Property changes on: lovely.viewcache/trunk
___________________________________________________________________
Name: svn:ignore
+ .installed.cfg
bin
build
develop-eggs
dist
eggs
parts
Added: lovely.viewcache/trunk/buildout.cfg
===================================================================
--- lovely.viewcache/trunk/buildout.cfg 2007-03-22 15:51:29 UTC (rev 73456)
+++ lovely.viewcache/trunk/buildout.cfg 2007-03-22 15:52:39 UTC (rev 73457)
@@ -0,0 +1,8 @@
+[buildout]
+develop = .
+parts = test
+find-links = http://download.zope.org/distribution/
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = lovely.viewcache [test]
Property changes on: lovely.viewcache/trunk/buildout.cfg
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: lovely.viewcache/trunk/setup.cfg
===================================================================
--- lovely.viewcache/trunk/setup.cfg 2007-03-22 15:51:29 UTC (rev 73456)
+++ lovely.viewcache/trunk/setup.cfg 2007-03-22 15:52:39 UTC (rev 73457)
@@ -0,0 +1,3 @@
+[egg_info]
+tag_build = .dev
+tag_svn_revision = 1
Property changes on: lovely.viewcache/trunk/setup.cfg
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: lovely.viewcache/trunk/setup.py
===================================================================
--- lovely.viewcache/trunk/setup.py 2007-03-22 15:51:29 UTC (rev 73456)
+++ lovely.viewcache/trunk/setup.py 2007-03-22 15:52:39 UTC (rev 73457)
@@ -0,0 +1,24 @@
+#!python
+from setuptools import setup, find_packages
+
+setup(name='lovely.viewcache',
+ version='0.1',
+ author="Stephan Richter, Jodok Batlogg",
+ author_email="srichter at cosmos.phy.tufts.edu, jodok.batlogg at lovelysystems.com",
+ description="A view cache for zope 3",
+ license = "ZPL 2.1",
+ keywords = "zope3 web20 zope view cache",
+ url='svn://svn.zope.org/repos/main/lovely.viewcache',
+
+ packages=find_packages('src'),
+ include_package_data=True,
+ package_dir = {'':'src'},
+ namespace_packages=['lovely'],
+ install_requires=['setuptools',
+ 'zope.interface',
+ 'zope.component',
+ 'lovely.mount',
+ ],
+ extras_require={"test": ["zope.app.testing", "z3c.configurator"]},
+ dependency_links=['http://download.zope.org/distribution'],
+ )
Property changes on: lovely.viewcache/trunk/setup.py
___________________________________________________________________
Name: svn:mime-type
+ text/x-python
Name: svn:eol-style
+ native
Added: lovely.viewcache/trunk/src/lovely/__init__.py
===================================================================
--- lovely.viewcache/trunk/src/lovely/__init__.py 2007-03-22 15:51:29 UTC (rev 73456)
+++ lovely.viewcache/trunk/src/lovely/__init__.py 2007-03-22 15:52:39 UTC (rev 73457)
@@ -0,0 +1,7 @@
+# This directory is a Python namespace package.
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
Property changes on: lovely.viewcache/trunk/src/lovely/__init__.py
___________________________________________________________________
Name: svn:mime-type
+ text/x-python
Name: svn:eol-style
+ native
Modified: lovely.viewcache/trunk/src/lovely/viewcache/ftesting.zcml
===================================================================
--- lovely.viewcache/trunk/src/lovely/viewcache/ftesting.zcml 2007-03-22 15:51:29 UTC (rev 73456)
+++ lovely.viewcache/trunk/src/lovely/viewcache/ftesting.zcml 2007-03-22 15:52:39 UTC (rev 73457)
@@ -1,9 +1,18 @@
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:meta="http://namespaces.zope.org/meta"
+ xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="zope">
- <include package="zope.app" />
+ <include
+ zcml:condition="installed zope.app.zcmlfiles"
+ package="zope.app.zcmlfiles"
+ />
+ <include
+ zcml:condition="not-installed zope.app.zcmlfiles"
+ package="zope.app"
+ />
+
<include package="zope.app.cache" />
<include package="lovely.viewcache" />
Deleted: lovely.viewcache/trunk/src/lovely/viewcache/ftests.py
===================================================================
--- lovely.viewcache/trunk/src/lovely/viewcache/ftests.py 2007-03-22 15:51:29 UTC (rev 73456)
+++ lovely.viewcache/trunk/src/lovely/viewcache/ftests.py 2007-03-22 15:52:39 UTC (rev 73457)
@@ -1,57 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Lovely Systems 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$
-"""
-__docformat__ = 'restructuredtext'
-
-import unittest
-from zope.app.testing import functional
-
-functional.defineLayer('TestLayer', 'ftesting.zcml')
-
-
-def setUp(test):
- """Setup a reasonable environment for the category tests"""
- pass
-
-def setUpRamCache(test):
- """runs the configurator for a ram cache.
- """
- from zope.app.testing import functional
- root = functional.getRootFolder()
- from lovely.viewcache.configurator import RAMViewCacheConfigurator
- RAMViewCacheConfigurator(root)(None)
- test.globs['root']=root
-
-
-
-
-def tearDown(test):
- pass
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suites = (
- functional.FunctionalDocFileSuite('README.txt', package='lovely.viewcache.stats',
- setUp=setUpRamCache),
- )
- for s in suites:
- s.layer=TestLayer
- suite.addTest(s)
- return suite
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
Modified: lovely.viewcache/trunk/src/lovely/viewcache/tests.py
===================================================================
--- lovely.viewcache/trunk/src/lovely/viewcache/tests.py 2007-03-22 15:51:29 UTC (rev 73456)
+++ lovely.viewcache/trunk/src/lovely/viewcache/tests.py 2007-03-22 15:52:39 UTC (rev 73457)
@@ -24,7 +24,7 @@
from zope.app.folder import rootFolder
from zope.app.publication.zopepublication import ZopePublication
from zope.testing.doctestunit import DocTestSuite, DocFileSuite
-from zope.app.testing import setup
+from zope.app.testing import functional
import ZODB.tests.util, transaction
from ZODB.interfaces import IDatabase
from zope.schema.interfaces import IVocabularyFactory
@@ -66,7 +66,27 @@
tearDown(test)
+# Functional testing:
+
+functional.defineLayer('LovelyViewcacheLayer', 'ftesting.zcml')
+
+def setUpRamCache(test):
+ """runs the configurator for a ram cache.
+ """
+ root = functional.getRootFolder()
+ from lovely.viewcache.configurator import RAMViewCacheConfigurator
+ RAMViewCacheConfigurator(root)(None)
+ test.globs['root']=root
+
+
def test_suite():
+ ftests = functional.FunctionalDocFileSuite(
+ 'README.txt',
+ package='lovely.viewcache.stats',
+ setUp=setUpRamCache,
+ )
+ ftests.layer = LovelyViewcacheLayer
+
return unittest.TestSuite((
DocFileSuite('README.txt',
setUp=setUp, tearDown=tearDown,
@@ -80,6 +100,7 @@
setUp=setUpZODB, tearDown=tearDownZODB,
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
),
+ ftests,
))
if __name__ == '__main__':
More information about the Checkins
mailing list