%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python3.8/unittest/test/testmock/__pycache__/
Upload File :
Create Path :
Current File : //usr/local/lib/python3.8/unittest/test/testmock/__pycache__/testcallable.cpython-38.pyc

U

qa@sfddlZddlmZmZmZddlmZmZmZm	Z	m
Z
mZmZGdddej
ZedkrbedS)N)is_instanceX	SomeClass)Mock	MagicMockNonCallableMagicMockNonCallableMockpatchcreate_autospec
CallableMixinc@sleZdZddZddZddZddZd	d
ZddZd
dZ	ddZ
ddZddZddZ
ddZdS)TestCallablecCs$|t|t|t|tdSN)
assertTruerrassertFalserselfmockr?/usr/local/lib/python3.8/unittest/test/testmock/testcallable.pyassertNotCallableszTestCallable.assertNotCallablecCsFttfD]4}|t||t|d||jjt	|qdS)N__call__)
rrassertRaises	TypeErrorrhasattrZassertIn	__class____name__reprrrrrtest_non_callableszTestCallable.test_non_callablecCs$|ttt|tttdSr
)r
issubclassrrrrrrrrtest_hierarchyszTestCallable.test_hierarchycCs<t}|tt|jtt}|tt|jtdSr
)	rrrtypeonerrtwor)rr"r#rrrtest_attributes#szTestCallable.test_attributescCs\Gdddt}|}|tt|j|Gdddt}|}|tt|j|dS)Nc@seZdZdS)z-TestCallable.test_subclasses.<locals>.MockSubNr
__module____qualname__rrrrMockSub,sr(c@seZdZdS)z.TestCallable.test_subclasses.<locals>.MagicSubNr%rrrrMagicSub2sr))rrrr!r"rr#)rr(r"r)r#rrrtest_subclasses+szTestCallable.test_subclassescCsLtdtdd}|}||j|}||||t|dS)N%s.XTspec	r	rstart
addCleanupstopassert_called_once_withrrrrpatcherrinstancerrrtest_patch_spec9s
zTestCallable.test_patch_speccCsLtdtdd}|}||j|}||||t|dS)Nr+Tspec_setr.r3rrrtest_patch_spec_setEs
z TestCallable.test_patch_spec_setcCs@tdttd}|}||j|||t|dS)Nr+r,	r	rrr/r0r1rrrrr4rrrrtest_patch_spec_instanceQs

z%TestCallable.test_patch_spec_instancecCs@tdttd}|}||j|||t|dS)Nr+r7r:r;rrrtest_patch_spec_set_instanceZs

z)TestCallable.test_patch_spec_set_instancec	CsGdddt}Gddd|}Gdddt|}dD]}|||fD]}tdtf||iz}|}||t|t|t	t
|d	|}||d
dd|d
dd|d
dd|jd
ddW5QRXqDq6dS)
Nc@seZdZddZdS)z>TestCallable.test_patch_spec_callable_class.<locals>.CallableXcSsdSr
rrrrrrezGTestCallable.test_patch_spec_callable_class.<locals>.CallableX.__call__N)rr&r'rrrrr	CallableXdsr?c@seZdZdS)z8TestCallable.test_patch_spec_callable_class.<locals>.SubNr%rrrrSubgsr@c@seZdZdS)z:TestCallable.test_patch_spec_callable_class.<locals>.MultiNr%rrrrMultijsrA)r-r8r+Z	foobarbaz)rrr	rr2rrrrAttributeErrorgetattrZfoo)	rr?r@rAargZKlassrr5resultrrrtest_patch_spec_callable_classcs$
z+TestCallable.test_patch_spec_callable_classcCs4tt}|}|t|tt}|t|dSr
)r
rrr)rrr5rrrtest_create_autospecs

z!TestCallable.test_create_autospeccCs@ttdd}|t|||j|t|jdddS)NT)r5Zsomeargs)r
rrrZwibbler2rrrrtest_create_autospec_instances

z*TestCallable.test_create_autospec_instanceN)rr&r'rrr r$r*r6r9r<r=rIrJrLrrrrrs			r__main__)ZunittestZunittest.test.testmock.supportrrrZ
unittest.mockrrrrr	r
rZTestCaserrmainrrrr<module>s$

Zerion Mini Shell 1.0