Add PLO test file for Betfair, update test to import it

This commit is contained in:
Worros 2009-12-03 17:45:04 +08:00
parent 247af28f7e
commit b7d9a843bd
2 changed files with 82 additions and 14 deletions

View File

@ -0,0 +1,55 @@
***** Betfair Poker Hand History for Game 100000000 *****
PL $0.05/$0.10 Omaha - Sunday, October 18, 20:00:00 GMT 2009
Table Death 1 6-max (Real Money)
Seat 2 is the button
Total number of active players : 6
Seat 1: Player6 ( $1 )
Seat 2: Player3 ( $9.38 )
Seat 3: Player2 ( $2.82 )
Seat 4: Player4 ( $4.13 )
Seat 5: Player5 ( $28.77 )
Seat 6: Player1 ( $6.46 )
Player2 posts small blind [$0.05]
Player4 posts big blind [$0.10]
Player6 posts big blind [$0.10]
** Dealing down cards **
Dealt to Player6 [ 7c, 6c, 5h, Jh ]
Player5 folds
Player1 calls [$0.10]
Player6 checks
Player3 calls [$0.10]
Player2 raises to [$0.30]
Player4 calls [$0.20]
Player1 calls [$0.20]
Player6 goes all-in
Player6 raises to [$1]
Player3 calls [$0.90]
Player2 calls [$0.70]
Player4 calls [$0.70]
Player1 calls [$0.70]
** Dealing Flop ** [ 4d, 5d, 6d ]
Player2 checks
Player4 checks
Player1 checks
Player3 checks
** Dealing Turn ** [ 3s ]
Player2 checks
Player4 bets [$0.10]
Player1 calls [$0.10]
Player3 folds
Player2 folds
** Dealing River ** [ 4c ]
Player4 goes all-in
Player4 bets [$3.03]
Player1 calls [$3.03]
** Showdown **
Player6 shows [ 7c, 6c, 5h, Jh ] a straight, Seven to Three
Player4 shows [ 7d, 8c, 3d, 6h ] a straight flush, Seven to Three
Player1 shows [ 3h, 4h, Td, 4s ] four of a kind, Fours
** Hand Conclusion **
Player4 wins $6.26 from side pot #1 with a straight flush, Seven to Three
Player4 wins $4.44 from main pot with a straight flush, Seven to Three
************ Game 100000000 ends ************

View File

@ -1,21 +1,34 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import BetfairToFpdb import BetfairToFpdb
from Hand import *
import py import py
import Configuration
import Database
import SQL
import fpdb_import
def checkGameInfo(hhc, header, info): config = Configuration.Config(file = "HUD_config.test.xml")
assert hhc.determineGameType(header) == info db = Database.Database(config)
sql = SQL.Sql(db_server = 'sqlite')
def testGameInfo(): settings = {}
hhc = BetfairToFpdb.Betfair(autostart=False) settings.update(config.get_db_parameters())
pairs = ( settings.update(config.get_tv_parameters())
(u"""***** Betfair Poker Hand History for Game 472386869 ***** settings.update(config.get_import_parameters())
NL $0.02/$0.04 Texas Hold'em - Sunday, January 25, 10:10:42 GMT 2009 settings.update(config.get_default_paths())
Table Rookie 191 6-max (Real Money)
Seat 1 is the button
Total number of active players : 6""",
{'type':'ring', 'base':"hold", 'category':'holdem', 'limitType':'nl', 'sb':'0.02', 'bb':'0.04', 'currency':'USD'}),
)
for (header, info) in pairs: def testFlopImport():
yield checkGameInfo, hhc, header, info db.recreate_tables()
importer = fpdb_import.Importer(False, settings, config)
importer.setDropIndexes("don't drop")
importer.setFailOnError(True)
importer.setThreads(-1)
importer.addBulkImportImportFileOrDir(
"""regression-test-files/cash/Betfair/Flop/PLO-6max-USD-0.05-0.10-200909.All.in.river.splitpot.txt""", site="Betfair")
importer.setCallHud(False)
(stored, dups, partial, errs, ttime) = importer.runImport()
importer.clearFileList()
# Should actually do some testing here
assert 1 == 1