Skip to content

Commit 740f794

Browse files
author
Ram Rachum
committed
-
1 parent 4d7a45c commit 740f794

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.'''

garlicsim/test_garlicsim/test_doc/test_tutorial_2/test.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)