CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/PKGTOOLS/tests/test_CacheProxy.py

Go to the documentation of this file.
00001 from tests import cmsBuild
00002 import re
00003 
00004 from cmsBuild import CacheProxy
00005 from cmsBuild import ArchitectureDecorator
00006 
00007 cache = {}
00008 proxy = CacheProxy (cache, ArchitectureDecorator ("slc4_ia32_gcc345"))
00009 proxy["foo"] = "bar"
00010 cache["foo"] = "foobar"
00011 
00012 assert (proxy["foo"] == "bar")
00013 assert (cache["foo"] == "foobar")
00014 assert (proxy.has_key ("foo"))
00015 assert (not proxy.has_key ("slc4_ia32_gcc345foo"))
00016 assert (cache.has_key ("foo"))
00017 assert (cache.has_key ("slc4_ia32_gcc345foo"))