[NEWIMPORT] Commit currnetly failing test - sawShowdown

It would appear that all-in pre-flop doesn't flag sawShowdown.

Also modified the query to select street0Aggr, as that appears to be wrong at the moment
This commit is contained in:
Worros 2009-12-26 17:18:05 +08:00
parent 9f2f015fd0
commit 0e318e6d9f
2 changed files with 9 additions and 7 deletions

View File

@ -363,7 +363,7 @@ class DerivedStats():
def aggr(self, hand, i):
aggrers = set()
for act in hand.actions[hand.actionStreets[i]]:
if act[1] in ('completes', 'raises'):
if act[1] in ('completes', 'bets', 'raises'):
aggrers.add(act[0])
for player in hand.players:

View File

@ -89,13 +89,14 @@ def testFlopImport():
print "DEBUG: stored: %s dups: %s partial: %s errs: %s ttime: %s" %(stored, dups, partial, errs, ttime)
importer.clearFileList()
col = { 'sawShowdown': 2
col = { 'sawShowdown': 2, 'street0Aggr':3
}
q = """SELECT
s.name,
p.name,
hp.sawShowdown
hp.sawShowdown,
hp.street0Aggr
FROM
Hands as h,
Sites as s,
@ -119,7 +120,8 @@ and s.id = p.siteid"""
q = """SELECT
s.name,
p.name,
hp.sawShowdown
hp.sawShowdown,
hp.street0Aggr
FROM
Hands as h,
Sites as s,
@ -135,10 +137,10 @@ and s.id = p.siteid"""
c = db.get_cursor()
c.execute(q)
result = c.fetchall()
pstats = { u'Kinewma':0, u'Arbaz':0, u's0rrow':1, u'bys7':0, u'AAALISAAAA':1, u'Bl\xe5veis':0 }
for row, data in enumerate(result):
print "DEBUG: result[%s]: %s" %(row, result[row])
# Assert if any sawShowdown = True
assert result[row][col['sawShowdown']] == 1
print "DEBUG: result[%s]: %s == %s" %(row, result[row], pstats[data[1]])
assert result[row][col['sawShowdown']] == pstats[data[1]]
assert 0 == 1