| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python315/Lib/test/test_unittest/testmock/__pycache__/ |
Upload File : |
R
>lqjU1 c � � ] PH s ] QHGs ] QHGs ] QHGsGsGsG s G
s
Gs \ O s
\ O s Q Q\2 s Q Q\ O$ 2 s Q Q \ O$ 2 s\Q
6X c \ O, 2 P! P! )� )�catch_warnings)�is_instance)� MagicMock�Mock�patch�sentinel� mock_open�callc � � \ sQ s]
sQsP! )�SampleException� )�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r � �9C:\Python315\\Lib\test\test_unittest\testmock\testwith.pyr r
s � �$r r c �j ` � \ sQ s]s n Q sQ sQ sQ sQ sQ s Q s
Q sQ sQ
s
Q sQ sQ
sU sP! )�WithTestc �, � [ Q [ * [ O 2 9^tt^ 2 U O [
[ O Q2 PPP2 U O [
[ O 2 P! ) % f h K69 h��%s.something� unpatched)r r
r �
Something2�assertEqual� something� Something��selfs &r �test_with_statement�WithTest.test_with_statement sX � �
�>�H�,�h�.A�.A�
B�
B����Y��(;�(;�[�I� C�����H�$6�$6�7� C�
B�s �&B�B �B c � � U O [ 2 9^tt^ 2 [ Q [ * [ O
2 9^tt^ 2 U O
[ [ O
Q2 [ 2 g ) % f h L9 h PPP2 L ) % f h L9 hS O
[ [ O 2 P! r ) �assertRaisesr r r
r r r r r r s &r �test_with_statement_exception�&WithTest.test_with_statement_exception s� � �
�
�
��
/�
/��~��0�(�2E�2E�F�F�� � ��H�,?�,?��M�%�'�'� G�F��F� 0�
/�
/�
/��
����H�$6�$6�7s) �.B�
0A= �=B
�B
�B�B* �#B* c �2 � [ Q [ * 2 9^tt^ 2 oU O [ UQ2 U O [ U[ 2 Q2 PPP2 U O [ [ O 2 P! ) % f h K69 h)r r zpatching wrong type) r r
r r �
assertTruer r r r �r �mock_somethings & r �test_with_statement_as�WithTest.test_with_statement_as sd � �
�>�H�,�
-�
-�����Y���D��O�O�K�� �B�1�
3� .�
����H�$6�$6�7� .�
-�s �8B�B �B c �& � Q Q[ 2 oUO o[ O UQ2 9^tt^ 2 U O UO UQ2 PPP2 U O UO U2 P! ) % f h K.9 h)c � � \ sQ s])sQsQsP! )�6WithTest.test_patch_object_with_statement.<locals>.Foo�foor )r
r r r r r r r r �Foor. ) s � ��Ir r0 r r )�objectr r �assertNotEqualr )r r0 �originals & r � test_patch_object_with_statement�)WithTest.test_patch_object_with_statement( s` � � �&� ��=�=��
�\�\�#�{�
+�
+�����
�
�x��E� ,��������1� ,�
+�s �B � B � B c �< � [ P Q5 9^tt^ 2 [ Q[ * 2 9^tt^ 2 o[ Q[ * 2 9^tt^ 2 oU O [ UQ2 U O [
UQ2 PPP2 PPP2 PPP2 U O [ [ O 2 U O [
[ O 2 P! ) % f h Kj9 h ) % f h Ku9 h ) % f h K�9 h)T)�recordr �%s.something_elser ) r r r
r r �something_elser r �
SomethingElse�r r) �mock_something_elses & r �test_with_statement_nested�#WithTest.test_with_statement_nested1 s� � �
�4�
(�
(��~��0�1�1�^�U�K^�ai�Ki�Ej�Ej� oB�� � ��N�K�H�� � ��1D�!,�.� Fk�1� )�
����H�$6�$6�7������)?�)?�@�
Fk�Ej��1�1�� )�
(�sL �D�C8 �/C%
�C8 �D�%C5�.C5�0C8 �8D
�D
�D�D �D c �R � [ Q [ * [ O 2 9^tt^ 2 oU O [
UQ2 U O U[ O Q2 PPP2 U O [
[ O 2 P! ) % f h K69 h)r r zwrong patch�r r
r �Patchedr r r r( s & r �test_with_statement_specified�&WithTest.test_with_statement_specified<