mò ã¸Ec@s›dZdkZdkZedjo$eeiieiddƒƒndklZeii ei dƒd„Z d„Z edjo e ƒndS(s4Unit tests for the registerPackage directive. $Id$ Nt__main__is framework.py(stestingcCsdS(sô Testing registerPackage >>> from zope.app.testing.placelesssetup import setUp, tearDown >>> setUp() >>> import Products >>> import Products.Five >>> from Products.Five import zcml >>> zcml.load_config('meta.zcml', Products.Five) Make sure a python package with a valid initialize gets its initialize function called:: >>> configure_zcml = ''' ... ... ... ''' >>> zcml.load_string(configure_zcml) pythonproduct2 initialized Test to see if the pythonproduct2 python package actually gets setup as a zope2 product in the Control Panel. >>> product_listing = [] >>> import Zope2 >>> app = Zope2.app() >>> try: ... product_listing = app.Control_Panel.Products.objectIds() ... finally: ... app._p_jar.close() >>> 'pythonproduct2' in product_listing True Clean up: >>> tearDown() N((((tG/data/zmath/zope/lib/python/Products/Five/tests/test_registerpackage.pyttest_registerPackages-cCsdkl}|ƒS(N(s DocTestSuite(tzope.testing.doctestt DocTestSuite(R((Rt test_suiteKs (t__doc__tostsyst__name__texecfiletpathtjointProducts.Five.teststtestingtappendt__path__RRt framework(RRRRR((Rt?s $  0