#NEWLINE# def test_cooperators( self ) : #NEWLINE# #INDENT# 'Are cooperators stable over time?' #NEWLINE# eco = axelrod . Ecosystem ( self . res_cooperators ) #NEWLINE# eco . reproduce ( 100 ) #NEWLINE# pops = eco . population_sizes #NEWLINE# self . assertEqual ( len ( pops ) , 101 ) #NEWLINE# for p in pops : #NEWLINE# #INDENT# self . assertEqual ( len ( self ) , 4 ) #NEWLINE# self . assertEqual ( sum ( p ) , 1.0 ) #NEWLINE# self . assertEqual ( list ( set ( p ) ) , [ 0.25 ] )