#NEWLINE# def test_secrets( self ) : #NEWLINE# #INDENT# for secret_type in SecretCard . __subclasses__ ( ) : #NEWLINE# #INDENT# random . seed ( 1857 ) #NEWLINE# secret = secret_type ( ) #NEWLINE# game = generate_game_for ( secret_type , StonetuskBoar , CardTestingAgent , DoNothingAgent ) #NEWLINE# for turn in range ( 0 , ( ( secret . mana * 2 ) - 2 ) ) : #NEWLINE# #INDENT# game . play_single_turn ( ) #NEWLINE# #UNINDENT# def assert_different( ) : #NEWLINE# #INDENT# new_events = game . events . copy ( ) #NEWLINE# new_events . update ( game . other_player . hero . events ) #NEWLINE# new_events . update ( game . other_player . events ) #NEWLINE# new_events . update ( game . current_player . hero . events ) #NEWLINE# new_events . update ( game . current_player . events ) #NEWLINE# self . assertNotEqual ( events , new_events , secret . name ) #NEWLINE# #UNINDENT# def assert_same( ) : #NEWLINE# #INDENT# new_events = game . events . copy ( ) #NEWLINE# new_events . update ( game . current_player . hero . events ) #NEWLINE# new_events . update ( game . current_player . events ) #NEWLINE# new_events . update ( game . other_player . hero . events ) #NEWLINE# new_events . update ( game . other_player . events ) #NEWLINE# self . assertEqual ( events , new_events ) #NEWLINE# #UNINDENT# game . current_player . bind ( 'turn_ended' , assert_different ) #NEWLINE# game . other_player . bind ( 'turn_ended' , assert_different ) #NEWLINE# events = game . events . copy ( ) #NEWLINE# events . update ( game . other_player . hero . events ) #NEWLINE# events . update ( game . other_player . events ) #NEWLINE# events . update ( game . current_player . hero . events ) #NEWLINE# events . update ( game . current_player . events ) #NEWLINE# game . play_single_turn ( ) #NEWLINE# self . assertEqual ( 1 , len ( game . current_player . secrets ) ) #NEWLINE# game . play_single_turn ( ) #NEWLINE# game . play_single_turn ( )