/usr/lib/python3.6/site-packages/zope/component/__pycache__
NameSizeModeActions
event.cpython-36.opt-1.pyc7960644editdlrm
event.cpython-36.pyc7960644editdlrm
eventtesting.cpython-36.opt-1.pyc15830644editdlrm
eventtesting.cpython-36.pyc15830644editdlrm
factory.cpython-36.opt-1.pyc14710644editdlrm
factory.cpython-36.pyc14710644editdlrm
globalregistry.cpython-36.opt-1.pyc28510644editdlrm
globalregistry.cpython-36.pyc28510644editdlrm
hookable.cpython-36.opt-1.pyc12500644editdlrm
hookable.cpython-36.pyc12500644editdlrm
hooks.cpython-36.opt-1.pyc32640644editdlrm
hooks.cpython-36.pyc32640644editdlrm
interface.cpython-36.opt-1.pyc36800644editdlrm
interface.cpython-36.pyc37630644editdlrm
interfaces.cpython-36.opt-1.pyc189590644editdlrm
interfaces.cpython-36.pyc189590644editdlrm
persistentregistry.cpython-36.opt-1.pyc20460644editdlrm
persistentregistry.cpython-36.pyc20460644editdlrm
registry.cpython-36.opt-1.pyc15460644editdlrm
registry.cpython-36.pyc15460644editdlrm
security.cpython-36.opt-1.pyc25520644editdlrm
security.cpython-36.pyc25520644editdlrm
standalonetests.cpython-36.opt-1.pyc16720644editdlrm
standalonetests.cpython-36.pyc17380644editdlrm
testing.cpython-36.opt-1.pyc11510644editdlrm
testing.cpython-36.pyc11510644editdlrm
testlayer.cpython-36.opt-1.pyc47380644editdlrm
testlayer.cpython-36.pyc47380644editdlrm
zcml.cpython-36.opt-1.pyc141610644editdlrm
zcml.cpython-36.pyc141610644editdlrm
_api.cpython-36.opt-1.pyc57940644editdlrm
_api.cpython-36.pyc57940644editdlrm
_compat.cpython-36.opt-1.pyc3370644editdlrm
_compat.cpython-36.pyc3370644editdlrm
_declaration.cpython-36.opt-1.pyc18010644editdlrm
_declaration.cpython-36.pyc18010644editdlrm
__init__.cpython-36.opt-1.pyc17860644editdlrm
__init__.cpython-36.pyc17860644editdlrm
Edit: /usr/lib/python3.6/site-packages/zope/component/__pycache__/testlayer.cpython-36.pyc (4738B)
3 ,WX @sddlZddlmZmZyddlmZWnek rDddZYnXddlmZddl m Z ddl m Z m Z Gd d d eZGd d d eZGd ddeZdS)N) xmlconfigconfig)cleanUpcCsdS)Nrrr/usr/lib/python3.6/testlayer.pyrsr)provideHandler)setHooks)events clearEventsc@s>eZdZdZfZd ddZddZddZd d Zd d Z dS) LayerBaseaSane layer base class. zope.testing implements an advanced mechanism so that layer setUp, tearDown, testSetUp and testTearDown code gets called in the right order. These methods are supposed to be @classmethods and should not use super() as the test runner is supposed to take care of that. In practice, this mechanism turns out not to be useful and overcomplicated. It becomes difficult to pass information into layers (such as a ZCML file to load), because the only way to pass in information is to subclass, and subclassing these layers leads to a range of interactions that is hard to reason about. We'd rather just use Python and the super mechanism, as we know how to reason about that. This base class is a hack to make this possible. The hack requires us to set __bases__, __module__ and __name__. This fools zope.testing into thinking that this layer instance is a class it can work with. It'd be better if zope.testing just called a minimal API and didn't try to be fancy. Fancy layer inheritance mechanisms can then be implemented elsewhere if people want to. But unfortunately it does implement a fancy mechanism and we need to fool it. NcCs(|dkr|jj}||_|j|_||_dS)N) __class____name__ __module__package)selfrnamerrr__init__;s zLayerBase.__init__cCsdS)Nr)rrrrsetUpBszLayerBase.setUpcCsdS)Nr)rrrrtearDownEszLayerBase.tearDowncCsdS)Nr)rrrr testSetUpHszLayerBase.testSetUpcCsdS)Nr)rrrr testTearDownKszLayerBase.testTearDown)N) r r __qualname____doc__ __bases__rrrrrrrrrr s r csBeZdZdZd fdd ZddZddZd d Zd d ZZ S) ZCMLLayerBasez%Base class to load up some ZCML. Ncs tt|j|||pg|_dS)N)superrrfeatures)rrrr)r rrrQszZCMLLayerBase.__init__cCsNttj}tj|x|jD]}|j|q W|j||_t t j ddS)N)N) rrZConfigurationMachinerZregisterCommonDirectivesrZprovideFeature _load_zcmlcontextrr append)rrZfeaturerrrrUs   zZCMLLayerBase.setUpcCs tdS)N)r )rrrrr^szZCMLLayerBase.testTearDowncCs tdS)N)r)rrrrraszZCMLLayerBase.tearDowncCstdS)N)NotImplementedError)rrrrrrdszZCMLLayerBase._load_zcml)NN) r rrrrrrrr __classcell__rr)r rrNs  rcs*eZdZdZdfdd ZddZZS) ZCMLFileLayera8This layer can be used to run tests with a ZCML file loaded. The ZCML file is assumed to include sufficient (meta)configuration so that it can be interpreted itself. I.e. to create a ZCMLLayer based on another ZCMLLayer's ZCML, just use a ZCML include statement in your own ZCML to load it. ftesting.zcmlNcs2tt|j|||tjjtjj|j||_dS)N) rr"rospathjoindirname__file__ zcml_file)rrr)rr)r rrroszZCMLFileLayer.__init__cCstj|j|j|ddS)NT)rrZexecute)rfiler)r)rrrrrruszZCMLFileLayer._load_zcml)r#NN)r rrrrrr!rr)r rr"gsr")r$Zzope.configurationrrZzope.testing.cleanupr ImportErrorZzope.componentrZzope.component.hooksrZzope.component.eventtestingr r objectr rr"rrrrs  1