ok
Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/tap/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/tap/__pycache__/rules.cpython-311.pyc |
� �܋f� � �F � d dl mZ d dlmZ d dlmZ G d� de� � ZdS )� )�Adapter)� Directive)�Resultc �V � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd S )�Rulesc �8 � || _ || _ g dg d�| _ d S )Nr )�plan�test�version)� _filename�_suite�_lines_seen)�self�filename�suites �Z/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/tap/rules.py�__init__zRules.__init__ s( � �!������$&��b�A�A����� c �r � | j d r| � � � | � |� � dS )z;Check the status of all provided data and update the suite.r N)r �_process_version_lines�_process_plan_lines)r �final_line_counts r �checkzRules.check s? � ���I�&� *��'�'�)�)�)�� � �!1�2�2�2�2�2r c �� � t | j d � � dk r| � d� � dS | j d d dk r| � d� � dS dS )zProcess version line rules.r � z Multiple version lines appeared.r z&The version must be on the first line.N)�lenr � _add_error�r s r r zRules._process_version_lines so � ��t�� �*�+�+�a�/�/��O�O�>�?�?�?�?�?� � �i� (�� +�q� 0� 0��O�O�D�E�E�E�E�E� 1� 0r c �� � | j d s| � d� � dS t | j d � � dk r| � d� � dS | j d d \ }}| � ||� � s| � d� � dS |j | j d k r<| � d � |j | j d � � � � � dS dS )zProcess plan line rules.r zMissing a plan.Nr z)Only one plan line is permitted per file.r z7A plan must appear at the beginning or end of the file.r z:Expected {expected_count} tests but only {seen_count} ran.)�expected_count� seen_count)r r r �_plan_on_valid_line�expected_tests�format)r r r �at_lines r r zRules._process_plan_lines s � ����'� ��O�O�-�.�.�.��F��t���'�(�(�1�,�,��O�O�G�H�H�H��F��(��0��3� ��g��'�'��1A�B�B� ��O�O�U�V�V�V��F���$�"2�6�":�:�:��O�O�L�S�S�#'�#6�#�/��7� T� � � � � � � � ;�:r c �~ � |dk s||k rdS | j d o| j d d dk o|dk }|rdS dS )z#Check if a plan is on a valid line.r Tr r � F�r )r r% r � after_versions r r"