o
    Ni                      @   s6   d dl Z d dlmZ d dlmZ G dd de jZdS )    N)easy_install)metadatac                   @   s   e Zd Zdd Zdd ZdS )TestPackagingHelpersc                 C   s>   d}t jddd}d}d}t||||}d}| || d S )Nconsole_scriptspbr.packaging)LocalInstallScriptsmodule_nameattrs#!/usr/bin/env fake-header
=%(group)s %(module_name)s %(import_target)s %(invoke_target)sz`#!/usr/bin/env fake-header
console_scripts pbr.packaging LocalInstallScripts LocalInstallScripts)r   
entrypointr   generate_scriptassertEqual)selfgroupentry_pointheadertemplategenerated_scriptexpected_script r   W/home/ubuntu/.local/lib/python3.10/site-packages/pbr/tests/_compat/test_easy_install.pytest_generate_script1   s   z)TestPackagingHelpers.test_generate_scriptc                 C   sX   d}t jdd d}d}d}| ttj|||| t jddd}| ttj|||| d S )Nr   r   r   r   r   )attr1attr2attr3)r   r   assertRaises
ValueErrorr   r   )r   r   r   r   r   r   r   r   +test_generate_script_validates_expectationsF   s8   	z@TestPackagingHelpers.test_generate_script_validates_expectationsN)__name__
__module____qualname__r   r   r   r   r   r   r   /   s    r   )	testtoolspbr._compatr   r   TestCaser   r   r   r   r   <module>   s   (