diff --git a/pyfpdb/test_PokerStars.py b/pyfpdb/test_PokerStars.py index 53a5fbee..dc65cb14 100644 --- a/pyfpdb/test_PokerStars.py +++ b/pyfpdb/test_PokerStars.py @@ -41,3 +41,38 @@ def testGameInfo(): for (header, info) in pairs: yield checkGameInfo, hhc, header, info + +def testHandInfo(): + text = u""""PokerStars Game #20461877044: Hold'em No Limit ($1/$2) - 2008/09/16 18:58:01 ET""" + hhc = PokerStarsToFpdb.PokerStars(autostart=False) + h = HoldemOmahaHand(None, "PokerStars", gametype, text, builtFrom = "Test") + hhc.readHandInfo(h) + assert h.handid == '20461877044' + assert h.sitename == 'PokerStars' + assert h.starttime == (2008, 9, 16, 18, 58, 1, 1, 260, -1) + + text = u"""PokerStars Game #18707234955: Razz Limit ($0.50/$1.00) - 2008/07/09 - 21:41:43 (ET) +Table 'Lepus II' 8-max""" + hhc = PokerStarsToFpdb.PokerStars(autostart=False) + h = HoldemOmahaHand(None, "PokerStars", gametype, text, builtFrom = "Test") + hhc.readHandInfo(h) + assert h.handid == '18707234955' + assert h.sitename == 'PokerStars' + assert h.maxseats == 8 + assert h.tablename == 'Lepus II' + assert h.starttime == (2008,7 , 9, 21, 41, 43, 2, 191, -1) + + + text = u"""PokerStars Game #22073591924: Hold'em No Limit ($0.50/$1.00) - 2008/11/16 1:22:21 CET [2008/11/15 19:22:21 ET] +Table 'Caia II' 6-max Seat #2 is the button""" + hhc = PokerStarsToFpdb.PokerStars(autostart=False) + h = HoldemOmahaHand(None, "PokerStars", gametype, text, builtFrom = "Test") + hhc.readHandInfo(h) + assert h.handid == '22073591924' + assert h.sitename == 'PokerStars' + assert h.maxseats == 6 + assert h.tablename == 'Caia II' + assert h.buttonpos == '2' # TODO: should this be an int? + assert h.starttime == (2008,11 , 15, 19, 22, 21, 5, 320, -1) + + \ No newline at end of file