<s> from interface . gtp_wrapper import run_gtp <EOL> from multiprocessing import Process <EOL> from AlphaGo import go <EOL> import unittest <EOL> class PassPlayer ( object ) : <EOL> def get_move ( self , state ) : <EOL> return go . PASS_MOVE <EOL> class TestGTPProcess ( unittest . TestCase ) : <EOL> def test_run_commands ( self ) : <EOL> def stdin_simulator ( ) : <EOL> return "<STR_LIT:\n>" . join ( [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" ] ) <EOL> gtp_proc = Process ( target = run_gtp , args = ( PassPlayer ( ) , stdin_simulator ) ) <EOL> gtp_proc . start ( ) <EOL> gtp_proc . join ( timeout = <NUM_LIT:1> ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
