관리-도구
편집 파일: test_adapter.cpython-311.pyc
� �܋fX � �F � d dl mZ d dlmZ d dlmZ G d� de� � ZdS )� )�mock)�Adapter)�TestCasec �0 � e Zd ZdZd� Zd� Zd� Zd� Zd� ZdS )�TestAdapterzTests for tap.adapter.Adapterc �` � d}t |d� � }| � ||j � � dS )zThe adapter has a TAP filename.�fake.tapN)r �assertEqual� _filename)�self�tap_filename�adapters �g/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/tap/tests/test_adapter.py�test_adapter_has_filenamez%TestAdapter.test_adapter_has_filename s5 � �!���,��-�-������w�'8�9�9�9�9�9� c �� � | j � � � }t d|� � }t j � � } ||� � | � |j j � � dS )z"Add a success for an ok test line.r N)�factory�make_okr r �Mock� assertTrue� addSuccess�called)r �ok_liner �results r �test_handles_ok_test_linez%TestAdapter.test_handles_ok_test_line sZ � ��,�&�&�(�(���*�g�.�.�����������������)�0�1�1�1�1�1r c �B � | j � d�� � }t d|� � }| j � � � } ||� � | � dt |j � � � � | � d|j d d � � dS )z6Add a skip when a test line contains a skip directive.zSKIP This is the reason.��directive_textr � zThis is the reason.r N)r r r �make_test_resultr �len�skipped)r � skip_liner r s r �test_handles_skip_test_linez'TestAdapter.test_handles_skip_test_line s� � ��L�(�(�8R�(�S�S� ��*�i�0�0����.�.�0�0������������C���/�/�0�0�0����.���q�0A�!�0D�E�E�E�E�Er c �� � | j � d�� � }t d|� � }| j � � � } ||� � | � dt |j � � � � dS )z3Add an unexpected success for an ok todo test line.�TODO An incomplete testr r r N)r r r r r r! �unexpectedSuccesses�r � todo_liner r s r �test_handles_ok_todo_test_linez*TestAdapter.test_handles_ok_todo_test_line&