관리-도구
편집 파일: test_wrap.cpython-311.pyc
� �܋f� � �^ � d dl mZ d dlmZmZmZmZ d dlmZm Z m Z mZ G d� de� � ZdS )� )�TestCase)�Mock� MagicMock�patch�DEFAULT)�wrap�compare�log_capture� LogCapturec �b � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd � Zd� ZdS )�TestWrapc � �� t � � �t �j �j � � �fd�� � }t �j g � � t |� � d� � t �j ddi fddi fddi fg� � d S )Nc �0 �� �� � � dS �N� something��test��r�ms ��m/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/testfixtures/tests/test_wrap.py� test_functionz-TestWrap.test_wrapping.<locals>.test_function � �� � �F�F�H�H�H��;� r �before� r �after�r r r r r �method_calls��selfr r s @r � test_wrappingzTestWrap.test_wrapping s� �� ��F�F�� �a�h��� � � � � � � !� � � ����#�#�#�� � ����-�-�-���� �r�2�� �R��� �b�"��!� � � � � r c �� � t � � }t |� � d� � � }| � |j � � t |� � d� � t |j d� � d S )Nc � � dS r r r r r r z9TestWrap.test_wrapping_only_before.<locals>.test_function s � ��;r r � )r r �assertFalse�calledr � call_count)r! r r s r �test_wrapping_only_beforez"TestWrap.test_wrapping_only_before sq � ����� �f��� � � �� � �����'�'�'�� � ����-�-�-���!�1�%�%�%�%�%r c �" �� t � � �d�j _ t �j �j � � �fd�� � }t �j g � � t |� � d� � t �j ddi fddi fddi fg� � d S ) Nr c �8 �� �� | � � d| z S )Nzr:r r s �r r z:TestWrap.test_wrapping_wants_return.<locals>.test_function, s �� � �F�F�1�I�I�I���6�Mr zr:somethingr r r )r r )r r �return_valuer r r r r s @r �test_wrapping_wants_returnz#TestWrap.test_wrapping_wants_return'