From ebcfebbc2f8a512251fd02a4e231f901da74c951 Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Mon, 9 Mar 2009 23:01:58 +0000 Subject: [PATCH] gameinfo changes, to fit better with db spec in docs folder tests --- pyfpdb/test_FullTilt.py | 23 +++++++++++++++++++++++ pyfpdb/test_PokerStars.py | 19 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 pyfpdb/test_FullTilt.py create mode 100644 pyfpdb/test_PokerStars.py diff --git a/pyfpdb/test_FullTilt.py b/pyfpdb/test_FullTilt.py new file mode 100644 index 00000000..24183bc9 --- /dev/null +++ b/pyfpdb/test_FullTilt.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +import FulltiltToFpdb +import py + + +def checkGameInfo(hhc, header, info): + assert hhc.determineGameType(header) == info + +def testGameInfo(): + hhc = FulltiltToFpdb.FullTilt(autostart=False) + pairs = ( + ("Full Tilt Poker Game #10777181585: Table Deerfly (deep 6) - $0.01/$0.02 - Pot Limit Omaha Hi - 2:24:44 ET - 2009/02/22", + {'type':'ring', 'base':'hold', 'category':'omahahi', 'limitType':'pl', 'sb':'0.01', 'bb':'0.02', 'currency':'USD'}), + ("Full Tilt Poker Game #10773265574: Table Butte (6 max) - $0.01/$0.02 - Pot Limit Hold'em - 21:33:46 ET - 2009/02/21", + {'type':'ring', 'base':'hold', 'category':'holdem', 'limitType':'pl', 'sb':'0.01', 'bb':'0.02', 'currency':'USD'}), + ("Full Tilt Poker Game #9403951181: Table CR - tay - $0.05/$0.10 - No Limit Hold'em - 9:40:20 ET - 2008/12/09", + {'type':'ring', 'base':'hold', 'category':'holdem', 'limitType':'nl', 'sb':'0.05', 'bb':'0.10', 'currency':'USD'}), + ("Full Tilt Poker Game #10809877615: Table Danville - $0.50/$1 Ante $0.10 - Limit Razz - 21:47:27 ET - 2009/02/23", + {'type':'ring', 'base':'stud', 'category':'razz', 'limitType':'fl', 'sb':'0.50', 'bb':'1', 'currency':'USD'}) + ) + for (header, info) in pairs: + yield checkGameInfo, hhc, header, info + diff --git a/pyfpdb/test_PokerStars.py b/pyfpdb/test_PokerStars.py new file mode 100644 index 00000000..bbf6b7d5 --- /dev/null +++ b/pyfpdb/test_PokerStars.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +import PokerStarstoFpdb +import py + + +def checkGameInfo(hhc, header, info): + assert hhc.determineGameType(header) == info + +def testGameInfo(): + hhc = PokerStarstoFpdb.PokerStars(autostart=False) + pairs = ( + (u"PokerStars Game #20461877044: Hold'em No Limit ($1/$2) - 2008/09/16 18:58:01 ET", + {'type':'ring', 'base':"hold", 'category':'holdem', 'limitType':'nl', 'sb':'1', 'bb':'2', 'currency':'USD'}), + ) + for (header, info) in pairs: + yield checkGameInfo, hhc, header, info + + +