<s> import os <EOL> import sys <EOL> import time <EOL> import esky <EOL> import esky . util <EOL> from esky . util import LOCAL_HTTP_PORT <EOL> import esky . tests <EOL> platform = esky . util . get_platform ( ) <EOL> import eskytester <EOL> eskytester . yes_i_am_working ( ) <EOL> eskytester . yes_my_deps_are_working ( ) <EOL> eskytester . yes_my_data_is_installed ( ) <EOL> assert sys . frozen <EOL> app = esky . tests . TestableEsky ( sys . executable , "<STR_LIT>" . format ( LOCAL_HTTP_PORT ) ) <EOL> assert app . name == "<STR_LIT>" <EOL> assert app . active_version == app . version == "<STR_LIT>" <EOL> assert app . find_update ( ) is None <EOL> if os . environ . get ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> app . get_root ( ) <EOL> try : <EOL> app . cleanup ( ) <EOL> except esky . EskyLockedError : <EOL> print "<STR_LIT>" <EOL> time . sleep ( <NUM_LIT:10> ) <EOL> app . cleanup ( ) <EOL> assert os . path . isdir ( os . path . join ( app . _get_versions_dir ( ) , "<STR_LIT>" + platform ) ) <EOL> assert not os . path . isfile ( eskytester . script_path ( app , "<STR_LIT>" ) ) <EOL> assert os . path . isfile ( eskytester . script_path ( app , "<STR_LIT>" ) ) <EOL> assert os . path . isfile ( eskytester . script_path ( app , "<STR_LIT>" ) ) <EOL> if sys . platform == "<STR_LIT:win32>" : <EOL> for nm in os . listdir ( os . path . dirname ( sys . executable ) ) : <EOL> if nm . startswith ( "<STR_LIT>" ) and nm . endswith ( "<STR_LIT>" ) : <EOL> assert False , "<STR_LIT>" <EOL> for nm in os . listdir ( app . appdir ) : <EOL> if nm . startswith ( "<STR_LIT>" ) and nm . endswith ( "<STR_LIT>" ) : <EOL> assert False , "<STR_LIT>" <EOL> if sys . platform == "<STR_LIT:win32>" : <EOL> if "<STR_LIT>" not in os . environ : <EOL> assert hasattr ( sys , "<STR_LIT>" ) , "<STR_LIT>" <EOL> open ( os . path . join ( app . appdir , "<STR_LIT>" ) , "<STR_LIT:w>" ) . close ( ) </s>
