File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
garlicsim/test_garlicsim/test_doc/test_tutorial_2 Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 11# Copyright 2009-2011 Ram Rachum.
22# This program is distributed under the LGPL2.1 license.
33
4- '''Testing module for tutorial-2.'''
4+ '''Testing package for tutorial-2.'''
Original file line number Diff line number Diff line change @@ -142,18 +142,18 @@ def test():
142142 got_loser = True
143143 continue
144144
145- states = garlicsim .list_simulate (state , infinity )
146- len (states )
147- assert re .match (
148- r'^\[5000(, \d+)+\]$' ,
149- repr ([s .balance for s in states ])
150- )
151-
152- def get_end_balance ():
153- return garlicsim .simulate (state , infinity ).balance
154- results = [get_end_balance () for i in range (100 )]
155- assert 3000 < (sum (results ) / len (results )) < 6000
156- assert 0.4 < (results .count (6000 )/ len (results )) < 0.95
145+ states = garlicsim .list_simulate (state , infinity )
146+ len (states )
147+ assert re .match (
148+ r'^\[5000(, \d+)+\]$' ,
149+ repr ([s .balance for s in states ])
150+ )
151+
152+ def get_end_balance ():
153+ return garlicsim .simulate (state , infinity ).balance
154+ results = [get_end_balance () for i in range (100 )]
155+ assert 3000 < (sum (results ) / len (results )) < 6000
156+ assert 0.4 < (results .count (6000 )/ len (results )) < 0.95
157157
158158
159159
You can’t perform that action at this time.
0 commit comments