From 9f2f015fd0e65a6d64973d284b28d50d7a746c71 Mon Sep 17 00:00:00 2001 From: Worros Date: Sat, 26 Dec 2009 12:23:20 +0800 Subject: [PATCH] New test for all-in preflop. Test still fails - need to sort out an issue with database placement --- pyfpdb/test_PokerStars.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pyfpdb/test_PokerStars.py b/pyfpdb/test_PokerStars.py index e3e45c35..18a9f556 100644 --- a/pyfpdb/test_PokerStars.py +++ b/pyfpdb/test_PokerStars.py @@ -82,6 +82,8 @@ def testFlopImport(): # River: hero (continuation bets?) all-in and is not called importer.addBulkImportImportFileOrDir( """regression-test-files/cash/Stars/Flop/NLHE-6max-USD-0.05-0.10-200912.Stats-comparision.txt""", site="PokerStars") + importer.addBulkImportImportFileOrDir( + """regression-test-files/cash/Stars/Flop/NLHE-6max-USD-0.05-0.10-200912.Allin-pre.txt""", site="PokerStars") importer.setCallHud(False) (stored, dups, partial, errs, ttime) = importer.runImport() print "DEBUG: stored: %s dups: %s partial: %s errs: %s ttime: %s" %(stored, dups, partial, errs, ttime) @@ -114,6 +116,32 @@ and s.id = p.siteid""" # Assert if any sawShowdown = True assert result[row][col['sawShowdown']] == 0 + q = """SELECT + s.name, + p.name, + hp.sawShowdown +FROM + Hands as h, + Sites as s, + Gametypes as g, + HandsPlayers as hp, + Players as p +WHERE + h.siteHandNo = 37165169101 +and g.id = h.gametypeid +and hp.handid = h.id +and p.id = hp.playerid +and s.id = p.siteid""" + c = db.get_cursor() + c.execute(q) + result = c.fetchall() + 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 + + assert 0 == 1 + def testStudImport(): db.recreate_tables() importer = fpdb_import.Importer(False, settings, config)