选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
ó ×Äabc@`sÔdZddlmZmZmZddlZddlZddlZddlZddl m Z ej dƒZ e d„ƒZ d„Zd„Zd „Zd efd „ƒYZeƒZd efd „ƒYZdS(s, monkeypatching and mocking functionality. i(tabsolute_importtdivisiontprint_functionN(tfixtures^No module named (.*)$cc`stƒ}|V|jƒdS(súThe returned ``monkeypatch`` fixture provides these helper methods to modify objects, dictionaries or os.environ:: monkeypatch.setattr(obj, name, value, raising=True) monkeypatch.delattr(obj, name, raising=True) monkeypatch.setitem(mapping, name, value) monkeypatch.delitem(obj, name, raising=True) monkeypatch.setenv(name, value, prepend=False) monkeypatch.delenv(name, value, raising=True) monkeypatch.syspath_prepend(path) monkeypatch.chdir(path) All modifications will be undone after the requesting test function or fixture has finished. The ``raising`` parameter determines if a KeyError or AttributeError will be raised if the set/deletion operation has no target. N(t MonkeyPatchtundo(tmpatch((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pyt monkeypatch s cC`së|jdƒ}|jdƒ}t|ƒ}xº|D]²}|d|7}yt||ƒ}Wq1tk rknXq1yt|ƒWnQtk rÐ}t|ƒjƒd}||kr·‚qÑtd||fƒ‚nXt|||ƒ}q1W|S(Nt.iiÿÿÿÿsimport error in %s: %s(tsplittpopt __import__tgetattrtAttributeErrort ImportErrortstrtannotated_getattr(tnametpartstusedtfoundtparttextexpected((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pytresolve%s(    cC`sMyt||ƒ}Wn3tk rHtdt|ƒj||fƒ‚nX|S(Ns#%r object at %s has no attribute %r(R R ttypet__name__(tobjRtann((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pyRDs  cC`st|tjƒ sd|kr5td|fƒ‚n|jddƒ\}}t|ƒ}|rut||d|ƒn||fS(NRs+must be absolute import path string, not %riR(t isinstancetsixt string_typest TypeErrortrsplitRR(t import_pathtraisingtmoduletattrttarget((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pytderive_importpathPs tNotsetcB`seZd„ZRS(cC`sdS(Ns((tself((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pyt__repr__\s(Rt __module__R*(((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pyR([sRcB`s}eZdZd„Zeed„Zeed„Zd„Zed„Z d d„Z ed„Z d„Z d „Zd „ZRS( sj Object returned by the ``monkeypatch`` fixture keeping a record of setattr/item/env/syspath changes. cC`s(g|_g|_d|_d|_dS(N(t_setattrt_setitemtNonet_cwdt _savesyspath(R)((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pyt__init__gs   cC`sît}ddl}|tkr]t|tjƒs?tdƒ‚n|}t||ƒ\}}nt||tƒ}|rš|tkršt d||fƒ‚n|j |ƒrÁ|j j |tƒ}n|j j|||fƒt|||ƒdS(sk Set attribute value on target, memorizing the old value. By default raise AttributeError if the attribute did not exist. For convenience you can specify a string as ``target`` which will be interpreted as a dotted import path, with the last part being the attribute name. Example: ``monkeypatch.setattr("os.getcwd", lambda x: "/")`` would set the ``getcwd`` function of the ``os`` module. The ``raising`` value determines if the setattr should fail if the attribute is not already present (defaults to True which means it will raise). iNscuse setattr(target, name, value) or setattr(target, value) with target being a dotted import strings%r has no attribute %r(tTruetinspecttnotsetRRRR R'R R tisclasst__dict__tgetR,tappendtsetattr(R)R&RtvalueR#t__tracebackhide__R3toldval((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pyR9ms  cC`s¨t}|tkrKt|tjƒs3tdƒ‚nt||ƒ\}}nt||ƒsr|r¤t|ƒ‚q¤n2|j j ||t ||tƒfƒt ||ƒdS(s� Delete attribute ``name`` from ``target``, by default raise AttributeError it the attribute did not previously exist. If no ``name`` is specified and ``target`` is a string it will be interpreted as a dotted import path with the last part being the attribute name. If ``raising`` is set to False, no exception will be raised if the attribute is missing. sUuse delattr(target, name) or delattr(target) with target being a dotted import stringN( R2R4RRRR R'thasattrR R,R8R tdelattr(R)R&RR#R;((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pyR>�s  %cC`s3|jj|||j|tƒfƒ|||t|||ƒqt||ƒqWg|j(xXt|jƒD]G\}}}|tkr¦y ||=Wq°tk r¢q°Xqi|||R-RAR0R.RHRIR/RCRL(R)RRR:t dictionary((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pyRßs&        N(RR+t__doc__R1R4R2R9R>R@RBR.RFRGRKRLR(((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pyRcs #   (RPt __future__RRRRCRHtreRt_pytest.fixturesRtcompiletRE_IMPORT_ERROR_NAMERRRR'tobjectR(R4R(((s7/usr/lib/python2.7/site-packages/_pytest/monkeypatch.pyts