Give storeHands the ability to output test data

Will allow for regression testing of hand start time
This commit is contained in:
Worros 2010-12-10 21:35:49 +08:00
parent 8fa38a26cc
commit 02204edc48
2 changed files with 8 additions and 2 deletions

View File

@ -1692,7 +1692,13 @@ class Database:
# NEWIMPORT CODE # NEWIMPORT CODE
########################### ###########################
def storeHand(self, p): def storeHand(self, p, printdata = False):
if printdata:
print "######## Hands ##########"
import pprint
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(p)
print "###### End Hands ########"
#stores into table hands: #stores into table hands:
q = self.sql.query['store_hand'] q = self.sql.query['store_hand']

View File

@ -265,7 +265,7 @@ db: a connected Database object"""
# seats TINYINT NOT NULL, # seats TINYINT NOT NULL,
hh['seats'] = len(self.dbid_pids) hh['seats'] = len(self.dbid_pids)
self.dbid_hands = db.storeHand(hh) self.dbid_hands = db.storeHand(hh, printdata = printtest)
self.dbid_hpid = db.storeHandsPlayers(self.dbid_hands, self.dbid_pids, self.dbid_hpid = db.storeHandsPlayers(self.dbid_hands, self.dbid_pids,
self.stats.getHandsPlayers(), printdata = printtest) self.stats.getHandsPlayers(), printdata = printtest)
if self.saveActions: if self.saveActions: