
    cn                     F    d dl mZ d dlmZ  G d dej                        Zy)    )content)basec                   $    e Zd Zd Zd Zd Zd Zy)TestCommandsc                 
   | j                  d      \  }}}| j                  dt        j                  |             | j                  dt        j                  |             | j	                  d|       | j                  d|       y)zTest custom build_py command.

        Test that a custom subclass of the build_py command runs when listed in
        the commands [global] option, rather than the normal build command.
        build_pystdoutstderrz Running custom build_py command.r   N	run_setup	addDetailr   text_contentassertInassertEqualselfr	   r
   return_codes       9/usr/lib/python3/dist-packages/pbr/tests/test_commands.pytest_custom_build_py_commandz)TestCommands.test_custom_build_py_command/   sj     '+nnZ&@#x!5!5f!=>x!5!5f!=>8&AK(    c                 
   | j                  d      \  }}}| j                  dt        j                  |             | j                  dt        j                  |             | j	                  d|       | j                  d|       y)z Test custom deb_version command.deb_versionr	   r
   zExtracting deb versionr   Nr   r   s       r   "test_custom_deb_version_py_commandz/TestCommands.test_custom_deb_version_py_command<   h    &*nn]&C#x!5!5f!=>x!5!5f!=>.7K(r   c                 
   | j                  d      \  }}}| j                  dt        j                  |             | j                  dt        j                  |             | j	                  d|       | j                  d|       y)z Test custom rpm_version command.rpm_versionr	   r
   zExtracting rpm versionr   Nr   r   s       r   "test_custom_rpm_version_py_commandz/TestCommands.test_custom_rpm_version_py_commandD   r   r   c                 $   | j                  d      \  }}}| j                  d|       g }|j                  d      D ]3  }|j                  |j                  d      d   j	                                5 t        |dd       }| j                  ||       y)z?Test that freeze output is sorted in a case-insensitive manner.freezer   
z==N)run_pbrr   splitappendlowersorted)r   r	   r
   r   pkgsline	pkgs_sorts          r   test_freeze_commandz TestCommands.test_freeze_commandL   s    &*ll8&<#K(LL& 	5DKK

4(+1134	547O	D)r   N)__name__
__module____qualname__r   r   r   r)    r   r   r   r   .   s    )))*r   r   N)	testtoolsr   	pbr.testsr   BaseTestCaser   r-   r   r   <module>r1      s    R  &*4$$ &*r   