관리-도구
편집 파일: test_loader.cpython-311.pyc
� �܋f� � �r � d dl Z d dlmZ d dlZd dlZd dlZd dlmZ d dlmZ d dl m Z G d� de � � ZdS )� N)�StringIO)�mock)�Loader)�TestCasec �| � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z e j d ed � � � � d � � � Z dS )� TestLoaderzTests for tap.loader.Loaderc �p � t j d� � }t j d�� � }|� |� d� � � � |� � � t � � }|� |j � � }| � dt |j � � � � dS )zThe loader handles a file.z�TAP version 13 1..2 # This is a diagnostic. ok 1 A passing test not ok 2 A failing test This is an unknown line. Bail out! This test would abort. F��delete�utf-8� N) �inspect�cleandoc�tempfile�NamedTemporaryFile�write�encode�closer �load_suite_from_file�name�assertEqual�len�_tests��self�sample�temp�loader�suites �f/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/tap/tests/test_loader.py�test_handles_filezTestLoader.test_handles_file s� � ��!� � � �� �*�%�8�8�8��� � �6�=�=��)�)�*�*�*�� � ���������+�+�D�I�6�6�� ����C���-�-�.�.�.�.�.� c � � t � � }|� d� � }| � dt |j � � � � | � d� d�� � |j d j j � � dS )z8The loader records a failure when a file does not exist.z phony.tap� z{filename} does not exist.)�filenamer N)r r r r r �format�_line�description�r r r s r �test_file_does_not_existz#TestLoader.test_file_does_not_exist% s� � ������+�+�K�8�8������C���-�-�.�.�.����(�/�/��/�E�E��L��O�!�-� � � � � r"