<s> import os <EOL> import qisys . sh <EOL> from qidoc . test . test_qidoc_build import write_french_po <EOL> def test_install_translated ( qidoc_action , tmpdir ) : <EOL> translateme_proj = qidoc_action . add_test_project ( "<STR_LIT>" ) <EOL> qidoc_action ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> write_french_po ( translateme_proj . path ) <EOL> qidoc_action ( "<STR_LIT>" , "<STR_LIT>" , tmpdir . strpath , "<STR_LIT>" , "<STR_LIT>" ) <EOL> index_html = tmpdir . join ( "<STR_LIT>" ) <EOL> assert "<STR_LIT>" in index_html . read ( ) <EOL> def test_cleans_install_dir ( qidoc_action , tmpdir ) : <EOL> dest = tmpdir . join ( "<STR_LIT>" ) <EOL> world_proj = qidoc_action . add_test_project ( "<STR_LIT>" ) <EOL> index_rst = os . path . join ( world_proj . path , "<STR_LIT:source>" , "<STR_LIT>" ) <EOL> with open ( index_rst , "<STR_LIT:r>" ) as fp : <EOL> orig_contents = fp . read ( ) <EOL> with open ( index_rst , "<STR_LIT:a>" ) as fp : <EOL> fp . write ( """<STR_LIT>""" ) <EOL> world_rst = os . path . join ( world_proj . path , "<STR_LIT:source>" , "<STR_LIT>" ) <EOL> with open ( world_rst , "<STR_LIT:w>" ) as fp : <EOL> fp . write ( "<STR_LIT>" ) <EOL> qidoc_action ( "<STR_LIT>" , "<STR_LIT>" , dest . strpath ) <EOL> assert dest . join ( "<STR_LIT>" ) . check ( file = True ) <EOL> assert dest . join ( "<STR_LIT>" ) . check ( file = True ) <EOL> with open ( index_rst , "<STR_LIT:w>" ) as fp : <EOL> fp . write ( orig_contents ) <EOL> qisys . sh . rm ( world_rst ) <EOL> qidoc_action ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , dest . strpath ) <EOL> assert not dest . join ( "<STR_LIT>" ) . check ( file = True ) <EOL> assert dest . join ( "<STR_LIT>" ) . check ( file = True ) <EOL> def test_do_not_install_doctrees ( tmpdir , qidoc_action ) : <EOL> dest = tmpdir . join ( "<STR_LIT>" ) <EOL> qidoc_action . add_test_project ( "<STR_LIT>" ) <EOL> qidoc_action ( "<STR_LIT>" , "<STR_LIT>" , dest . strpath ) <EOL> assert not dest . join ( "<STR_LIT>" ) . check ( dir = True ) </s>
