p128 - corrected 2 bugs in PrintHand.py. finished stud blackbox testdata.

This commit is contained in:
steffen123
2008-10-09 05:30:09 +01:00
parent bc76d4baf0
commit 5dfa5061cf
6 changed files with 41 additions and 34 deletions
+2 -2
View File
@@ -148,7 +148,7 @@ for i in range (len(handsPlayers)):
else:
printstr+=ful.cards2String(line[5:13])
elif (category=="razz" or category=="studhi" or category=="studhilo"):
printstr+=" ante:"+str(line[3])+" cards:"
printstr+=" ante:"+str(line[4])+" cards:"
printstr+=ful.cards2String(line[5:19])
else:
print "TODO: raise error, print_hand.py"
@@ -167,7 +167,7 @@ for i in range (len(handsPlayers)):
line=handsActions[j][2:]
printstr="playerName:"+playerNames[i]
printstr+=" street:"+ful.street_int2String(category, line[0])+" streetActionNo:"+str(line[1])+" action:"+line[2]
printstr+=" amount:"+str(line[3])
printstr+=" amount:"+str(line[4])
print printstr
cursor.close()
+19 -19
View File
@@ -3,7 +3,7 @@ options.site: PokerStars siteId: 2
From Table Hands
================
handId: 4 tableName: Lydia siteHandNo: 15043388146 gametypeId: 2 handStart: 2008-02-04 03:04:15 seats: 6 maxSeats: 8
handId: 5 tableName: Lydia siteHandNo: 15043388146 gametypeId: 3 handStart: 2008-02-04 03:04:15 seats: 6 maxSeats: 8
From Table Gametypes
====================
@@ -17,27 +17,27 @@ From Table HandsPlayers
=======================
playerName:olimpicon99 playerStartcash:531 ante:2 cards:?? ?? 8c ?? ?? ?? ?? winnings:0 rake:0
playerName:PokerPig55 playerStartcash:158 ante:2 cards:?? ?? Kh ?? ?? ?? ?? winnings:0 rake:0
playerName:VISTA GIRL playerStartcash:83 ante:2 cards:?? ?? 8 ?? ?? ?? ??h winnings:0 rake:0
playerName:VISTA GIRL playerStartcash:83 ante:2 cards:?? ?? 8h ?? ?? ?? ?? winnings:0 rake:0
playerName:br1an playerStartcash:510 ante:2 cards:4c 7d 2d Qh 6d 6h 2h winnings:0 rake:0
playerName:steffen780 playerStartcash:400 ante:2 cards:Kc 9h 9c 5c 8s ?? ?? winnings:0 rake:0
playerName:willowdale playerStartcash:392 ante:2 cards:3s 4d 5s 4s Ad 5h 2c winnings:102 rake:5
From Table HandsActions
=======================
#playerName:olimpicon99 street:0 streetActionNo:3 action:fold amount:0
#playerName:PokerPig55 street:0 streetActionNo:4 action:fold amount:0
#playerName:VISTA GIRL street:0 streetActionNo:5 action:fold amount:0
#playerName:br1an street:0 streetActionNo:0 action:blind amount:0
#playerName:br1an street:1 streetActionNo:0 action:check amount:0
#playerName:br1an street:2 streetActionNo:1 action:call amount:0
#playerName:br1an street:3 streetActionNo:0 action:check amount:0
#playerName:br1an street:4 streetActionNo:0 action:check amount:0
#playerName:br1an street:4 streetActionNo:2 action:call amount:0
#playerName:steffen780 street:0 streetActionNo:1 action:call amount:0
#playerName:steffen780 street:1 streetActionNo:1 action:check amount:0
#playerName:steffen780 street:2 streetActionNo:2 action:fold amount:0
#playerName:willowdale street:0 streetActionNo:2 action:call amount:0
#playerName:willowdale street:1 streetActionNo:2 action:check amount:0
#playerName:willowdale street:2 streetActionNo:0 action:bet amount:0
#playerName:willowdale street:3 streetActionNo:1 action:check amount:0
#playerName:willowdale street:4 streetActionNo:1 action:bet amount:0
playerName:olimpicon99 street:0 streetActionNo:3 action:fold amount:0
playerName:PokerPig55 street:0 streetActionNo:4 action:fold amount:0
playerName:VISTA GIRL street:0 streetActionNo:5 action:fold amount:0
playerName:br1an street:0 streetActionNo:0 action:blind amount:5
playerName:br1an street:1 streetActionNo:0 action:check amount:0
playerName:br1an street:2 streetActionNo:1 action:call amount:20
playerName:br1an street:3 streetActionNo:0 action:check amount:0
playerName:br1an street:4 streetActionNo:0 action:check amount:0
playerName:br1an street:4 streetActionNo:2 action:call amount:20
playerName:steffen780 street:0 streetActionNo:1 action:call amount:5
playerName:steffen780 street:1 streetActionNo:1 action:check amount:0
playerName:steffen780 street:2 streetActionNo:2 action:fold amount:0
playerName:willowdale street:0 streetActionNo:2 action:call amount:5
playerName:willowdale street:1 streetActionNo:2 action:check amount:0
playerName:willowdale street:2 streetActionNo:0 action:bet amount:20
playerName:willowdale street:3 streetActionNo:1 action:check amount:0
playerName:willowdale street:4 streetActionNo:1 action:bet amount:20
+12 -9
View File
@@ -20,22 +20,25 @@ echo "Please note for this to work you need to work on an empty database, otherw
rm *.found.txt
../pyfpdb/fpdb_import.py -p$1 --file=ps-lhe-ring-3hands.txt -x
../pyfpdb/fpdb_import.py -p$1 --file=ps-lhe-ring-3hands.txt -x
../pyfpdb/fpdb_import.py -p$1 --file=ps-studhilo-ring-showdown.txt -x
echo "it should've reported first that it stored 3, then that it had 3 duplicates"
echo " then 1 stored"
#./PrintHand.py -p$1 --hand=14519394979 > ps.14519394979.found.txt && colordiff ps.14519394979.found.txt ps.14519394979.expected.txt
#./PrintHand.py -p$1 --hand=14519420999 > ps.14519420999.found.txt && colordiff ps.14519420999.found.txt ps.14519420999.expected.txt
#./PrintHand.py -p$1 --hand=14519433154 > ps.14519433154.found.txt && colordiff ps.14519433154.found.txt ps.14519433154.expected.txt
./PrintHand.py -p$1 --hand=15043388146 > ps.15043388146.found.txt && colordiff ps.15043388146.found.txt ps.15043388146.expected.txt
./PrintHand.py -p$1 --hand=14519394979 > ps.14519394979.found.txt && colordiff ps.14519394979.found.txt ps.14519394979.expected.txt
./PrintHand.py -p$1 --hand=14519420999 > ps.14519420999.found.txt && colordiff ps.14519420999.found.txt ps.14519420999.expected.txt
./PrintHand.py -p$1 --hand=14519433154 > ps.14519433154.found.txt && colordiff ps.14519433154.found.txt ps.14519433154.expected.txt
#./PrintPlayerHudData.py -p$1 -oM > ps-flags-M-2hands.found.txt && colordiff ps-flags-M-2hands.found.txt ps-flags-M-2hands.expected.txt
#./PrintPlayerHudData.py -p$1 -nPlayer_5 -oB > ps-flags-B-1hands.found.txt && colordiff ps-flags-B-1hands.found.txt ps-flags-B-1hands.expected.txt
./PrintPlayerHudData.py -p$1 -oM > ps-flags-M-2hands.found.txt && colordiff ps-flags-M-2hands.found.txt ps-flags-M-2hands.expected.txt
./PrintPlayerHudData.py -p$1 -nPlayer_5 -oB > ps-flags-B-1hands.found.txt && colordiff ps-flags-B-1hands.found.txt ps-flags-B-1hands.expected.txt
../pyfpdb/fpdb_import.py -p$1 --file=ps-lhe-ring-call-3B-preflop-cb-no2b.txt -x
echo "it should've now reported another successful store of 1 hand"
#./PrintPlayerHudData.py -p$1 -nplayer3 -oE -e10 -b25 > ps-flags-CBflop.found.txt && colordiff ps-flags-CBflop.found.txt ps-flags-CBflop.expected.txt
./PrintPlayerHudData.py -p$1 -nplayer3 -oE -e10 -b25 > ps-flags-CBflop.found.txt && colordiff ps-flags-CBflop.found.txt ps-flags-CBflop.expected.txt
../pyfpdb/fpdb_import.py -p$1 --file=ps-studhilo-ring-showdown.txt -x
echo "it should've now reported another successful store of 1 hand"
./PrintHand.py -p$1 --hand=15043388146 > ps.15043388146.found.txt && colordiff ps.15043388146.found.txt ps.15043388146.expected.txt
echo "if everything was printed as expected this worked"