[Zope3-checkins] CVS: Zope3/src/zope/app/cache/tests - test_annotationcacheable.py:1.9 test_cachename.py:1.6 test_caching.py:1.9 test_icache.py:1.3 test_ramcache.py:1.9

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Aug 19 14:34:49 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/cache/tests
In directory cvs.zope.org:/tmp/cvs-serv19346/cache/tests

Modified Files:
	test_annotationcacheable.py test_cachename.py test_caching.py 
	test_icache.py test_ramcache.py 
Log Message:
Just to make it worth the effort, here is the rewrite of the Caching Service
to use local utilities. I am amazed how much cruft can go away. There are
still some dead chickens left that can be easily fixed by providing a 
default overview screen for these services and remodeling the local utility
service a bit.

Jim,

noone has complained about the changes yet. Are you guys at ZC having a fit
with it? I think in general people just not use these components heavily
yet and it is no big deal to create them, since their data does not contain
much programming logic (i.e. they are easily recreated) and there are only
a few around ata time usually.


=== Zope3/src/zope/app/cache/tests/test_annotationcacheable.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/cache/tests/test_annotationcacheable.py:1.8	Fri Jun  6 16:44:30 2003
+++ Zope3/src/zope/app/cache/tests/test_annotationcacheable.py	Tue Aug 19 13:34:12 2003
@@ -15,7 +15,6 @@
 
 $Id$
 """
-
 from unittest import TestCase, TestSuite, main, makeSuite
 from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.component import getService
@@ -24,7 +23,7 @@
 from zope.app.interfaces.annotation import IAttributeAnnotatable
 from zope.app.attributeannotations import AttributeAnnotations
 from zope.app.cache.annotationcacheable import AnnotationCacheable
-from zope.app.interfaces.cache.cache import ICachingService
+from zope.app.interfaces.cache import ICachingService
 from zope.component.service import serviceManager as sm
 from zope.app.interfaces.services.service import ISimpleService
 from zope.interface import implements


=== Zope3/src/zope/app/cache/tests/test_cachename.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/cache/tests/test_cachename.py:1.5	Thu Jun  5 08:03:14 2003
+++ Zope3/src/zope/app/cache/tests/test_cachename.py	Tue Aug 19 13:34:12 2003
@@ -17,10 +17,9 @@
 
 $Id$
 """
-
 import unittest
 
-from zope.app.interfaces.cache.cache import CacheName
+from zope.app.interfaces.cache import CacheName
 from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.app.tests import setup
 from zope.app.interfaces.services.service import ILocalService


=== Zope3/src/zope/app/cache/tests/test_caching.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/cache/tests/test_caching.py:1.8	Fri Jun  6 16:44:30 2003
+++ Zope3/src/zope/app/cache/tests/test_caching.py	Tue Aug 19 13:34:12 2003
@@ -17,8 +17,7 @@
 """
 
 from unittest import TestCase, TestSuite, main, makeSuite
-from zope.app.interfaces.cache.cache import ICacheable
-from zope.app.interfaces.cache.cache import ICachingService
+from zope.app.interfaces.cache import ICacheable, ICachingService
 from zope.app.cache.caching import getCacheForObj
 from zope.app.cache.annotationcacheable import AnnotationCacheable
 from zope.app.interfaces.annotation import IAnnotatable


=== Zope3/src/zope/app/cache/tests/test_icache.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/cache/tests/test_icache.py:1.2	Wed Dec 25 09:12:45 2002
+++ Zope3/src/zope/app/cache/tests/test_icache.py	Tue Aug 19 13:34:12 2003
@@ -18,7 +18,7 @@
 
 from unittest import TestSuite, main
 from zope.interface.verify import verifyObject
-from zope.app.interfaces.cache.cache import ICache
+from zope.app.interfaces.cache import ICache
 
 
 class BaseICacheTest:


=== Zope3/src/zope/app/cache/tests/test_ramcache.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/cache/tests/test_ramcache.py:1.8	Fri Jun  6 16:44:30 2003
+++ Zope3/src/zope/app/cache/tests/test_ramcache.py	Tue Aug 19 13:34:12 2003
@@ -15,14 +15,18 @@
 
 $Id$
 """
-
+from time import time
 from unittest import TestCase, TestSuite, main, makeSuite
+from zope.app.cache.ram import RAMCache
 from zope.app.cache.tests.test_icache import BaseICacheTest
-from zope.app.tests.placelesssetup import PlacelessSetup
+from zope.app.interfaces.cache import ICache
+from zope.app.interfaces.cache.ram import IRAMCache
+from zope.app.interfaces.event import ISubscriber
 from zope.app.interfaces.traversing import IPhysicallyLocatable
+from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.interface.verify import verifyClass, verifyObject
 from zope.interface import implements
-from time import time
+
 
 
 class Locatable:
@@ -47,10 +51,6 @@
         return RAMCache()
 
     def test_interface(self):
-        from zope.app.cache.ram import RAMCache
-        from zope.app.interfaces.cache.ram import IRAMCache
-        from zope.app.interfaces.cache.cache import ICache
-        from zope.app.interfaces.event import ISubscriber
         verifyObject(IRAMCache, RAMCache())
         verifyClass(ICache, RAMCache)
         verifyClass(ISubscriber, RAMCache)




More information about the Zope3-Checkins mailing list