Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/zope/component/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/zope/component/testlayer.pyo
�
6j/Qc@s�ddlZddlmZmZyddlmZWnek
rRd�ZnXddlmZddl	m
Z
ddlmZm
Z
defd	��YZd
efd��YZdefd
��YZdS(i����N(t	xmlconfigtconfig(tcleanUpcCsdS(N((((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyRs(tprovideHandler(tsetHooks(teventstclearEventst	LayerBasecBsDeZdZdZdd�Zd�Zd�Zd�Zd�Z	RS(s�Sane 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.
    cCs=|dkr|jj}n||_|j|_||_dS(N(tNonet	__class__t__name__t
__module__tpackage(tselfRtname((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyt__init__;s
	cCsdS(N((R
((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pytsetUpBscCsdS(N((R
((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyttearDownEscCsdS(N((R
((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyt	testSetUpHscCsdS(N((R
((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyttestTearDownKs(N(
R
Rt__doc__t	__bases__RRRRRR(((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyRs			t
ZCMLLayerBasecBsAeZdZddd�Zd�Zd�Zd�Zd�ZRS(s%Base class to load up some ZCML.
    cCs,tt|�j||�|p"g|_dS(N(tsuperRRtfeatures(R
RRR((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyRQscCsgt�tj�}tj|�x|jD]}|j|�q*W|j|�|_t	t
jd�dS(N(N(
RRtConfigurationMachineRtregisterCommonDirectivesRtprovideFeaturet
_load_zcmltcontextRRtappendR(R
Rtfeature((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyRUs
cCst�dS(N(R(R
((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyR^scCst�dS(N(R(R
((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyRascCs
t�dS(N(tNotImplementedError(R
R((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyRdsN(	R
RRRRRRRR(((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyRNs				t
ZCMLFileLayercBs)eZdZdddd�Zd�ZRS(s8This 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.
    s
ftesting.zcmlcCsGtt|�j|||�tjjtjj|j�|�|_dS(N(	RR!Rtostpathtjointdirnamet__file__t	zcml_file(R
RR'RR((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyRoscCs%tj|jd|jd|dt�S(NRRtexecute(RtfileR'RtTrue(R
R((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyRus	N(R
RRRRR(((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyR!gs(R"tzope.configurationRRtzope.testing.cleanupRtImportErrortzope.componentRtzope.component.hooksRtzope.component.eventtestingRRtobjectRRR!(((s</usr/lib/python2.7/site-packages/zope/component/testlayer.pyt<module>s

1

Spamworldpro Mini