3 Fã\hã@s.ddlmZddlmZGdd„dejƒZdS)é)Úcontent)Úbasec@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) Ú TestCommandscCsP|jdƒ\}}}|jdtj|ƒƒ|jdtj|ƒƒ|jd|ƒ|jd|ƒdS)zÃTest 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.rN)Ú run_setupÚ addDetailrÚ text_contentÚassertInÚ assertEqual)ÚselfrrÚ return_code©rúl/private/var/folders/pf/wv4htv3x0qs2c2mp0dnn0kchsvlck3/T/pip-install-emcbgzcf/pbr/pbr/tests/test_commands.pyÚtest_custom_build_py_command/s  z)TestCommands.test_custom_build_py_commandcCsP|jdƒ\}}}|jdtj|ƒƒ|jdtj|ƒƒ|jd|ƒ|jd|ƒdS)z Test custom deb_version command.Z deb_versionrrzExtracting deb versionrN)rr rr r r )r rrrrrrÚ"test_custom_deb_version_py_command<s  z/TestCommands.test_custom_deb_version_py_commandcCsP|jdƒ\}}}|jdtj|ƒƒ|jdtj|ƒƒ|jd|ƒ|jd|ƒdS)z Test custom rpm_version command.Z rpm_versionrrzExtracting rpm versionrN)rr rr r r )r rrrrrrÚ"test_custom_rpm_version_py_commandDs  z/TestCommands.test_custom_rpm_version_py_commandcCsl|jdƒ\}}}|jd|ƒg}x*|jdƒD]}|j|jdƒdjƒƒq,Wt|dd…ƒ}|j||ƒdS)z?Test that freeze output is sorted in a case-insensitive manner.ÚfreezerÚ z==N)Zrun_pbrr ÚsplitÚappendÚlowerÚsorted)r rrrÚpkgsÚlZ pkgs_sortrrrÚtest_freeze_commandLs z TestCommands.test_freeze_commandN)Ú__name__Ú __module__Ú __qualname__rrrrrrrrr.s rN)Z testtoolsrZ pbr.testsrZ BaseTestCaserrrrrÚ)s