Add test for Stars sawShowdown.

Test currently fails in the old import code and passes on NEWIMPORT

Tests for uncalled allin bet on river, which has been erronously marked as showdown previously
This commit is contained in:
Worros 2009-12-06 22:57:27 +08:00
parent 8f787b2d44
commit 909c2bd0fc

View File

@ -87,19 +87,12 @@ def testFlopImport():
print "DEBUG: stored: %s dups: %s partial: %s errs: %s ttime: %s" %(stored, dups, partial, errs, ttime) print "DEBUG: stored: %s dups: %s partial: %s errs: %s ttime: %s" %(stored, dups, partial, errs, ttime)
importer.clearFileList() importer.clearFileList()
col = { 'sawShowdown': 2
}
q = """SELECT q = """SELECT
s.name, s.name,
g.category, p.name,
g.base,
g.type,
g.limitType,
g.hilo,
round(g.smallBlind / 100.0,2) as sb,
round(g.bigBlind / 100.0,2) as bb,
round(g.smallBet / 100.0,2) as SB,
round(g.bigBet / 100.0,2) as BB,
s.currency,
hp.playerId,
hp.sawShowdown hp.sawShowdown
FROM FROM
Hands as h, Hands as h,
@ -116,10 +109,10 @@ and s.id = p.siteid"""
c = db.get_cursor() c = db.get_cursor()
c.execute(q) c.execute(q)
result = c.fetchall() result = c.fetchall()
print "DEBUG: result: %s" %result for row, data in enumerate(result):
print "DEBUG: result[%s]: %s" %(row, result[row])
# Assert if any sawShowdown = True
assert 1 == 0 assert result[row][col['sawShowdown']] == 0
def testStudImport(): def testStudImport():
db.recreate_tables() db.recreate_tables()