git8 - updated the 3 ps testdatas and regression test

This commit is contained in:
steffen123 2008-08-04 21:51:32 +01:00
parent d95bc6dff6
commit 7af8bb922a
6 changed files with 32 additions and 15 deletions

View File

@ -111,6 +111,7 @@ class fpdb:
def dia_database_stats(self, widget, data): def dia_database_stats(self, widget, data):
print "todo: implement dia_database_stats" print "todo: implement dia_database_stats"
#string=fpdb_db.getDbStats(db, cursor)
#end def dia_database_stats #end def dia_database_stats
def dia_delete_db_parts(self, widget, data): def dia_delete_db_parts(self, widget, data):

View File

@ -23,7 +23,6 @@ class fpdb_db:
"""Simple constructor, doesnt really do anything""" """Simple constructor, doesnt really do anything"""
self.db=None self.db=None
self.cursor=None self.cursor=None
self.MYSQL=1
self.MYSQL_INNODB=2 self.MYSQL_INNODB=2
self.PGSQL=3 self.PGSQL=3
#end def __init__ #end def __init__
@ -36,7 +35,7 @@ class fpdb_db:
self.user=user self.user=user
self.password=password self.password=password
#print "fpdb_db.connect, password:",password,"/end" #print "fpdb_db.connect, password:",password,"/end"
if backend==self.MYSQL or backend==self.MYSQL_INNODB: if backend==self.MYSQL_INNODB:
import MySQLdb import MySQLdb
print "fpdb_db.connect, host:", host, " user:", user, " passwd:", password, " db:", database print "fpdb_db.connect, host:", host, " user:", user, " passwd:", password, " db:", database
self.db=MySQLdb.connect(host = host, user = user, passwd = password, db = database) self.db=MySQLdb.connect(host = host, user = user, passwd = password, db = database)

View File

@ -1,8 +1,14 @@
Connected to MySQL on localhost. Print Hand Utility Connected to MySQL on localhost. Print Hand Utility
options.site: PokerStars site_id: 2 options.site: PokerStars site_id: 2
From Table gametypes
====================
type: ring category: holdem limit_type: fl
sb: 1 bb: 2 sbet: 2 bbet: 4
From Table hands From Table hands
================ ================
site_hand_no: 14519394979 hand_start: 2008-01-13 05:22:15 seat_count: 7 category: holdem site_hand_no: 14519394979 hand_start: 2008-01-13 05:22:15 seat_count: 7
Board cards: Qd Th Js 2s 7s Board cards: Qd Th Js 2s 7s
From Table hands_players From Table hands_players

View File

@ -1,8 +1,14 @@
Connected to MySQL on localhost. Print Hand Utility Connected to MySQL on localhost. Print Hand Utility
options.site: PokerStars site_id: 2 options.site: PokerStars site_id: 2
From Table gametypes
====================
type: ring category: holdem limit_type: fl
sb: 1 bb: 2 sbet: 2 bbet: 4
From Table hands From Table hands
================ ================
site_hand_no: 14519420999 hand_start: 2008-01-13 05:23:43 seat_count: 7 category: holdem site_hand_no: 14519420999 hand_start: 2008-01-13 05:23:43 seat_count: 7
Board cards: Th Jd 3c 7c 4s Board cards: Th Jd 3c 7c 4s
From Table hands_players From Table hands_players

View File

@ -1,8 +1,14 @@
Connected to MySQL on localhost. Print Hand Utility Connected to MySQL on localhost. Print Hand Utility
options.site: PokerStars site_id: 2 options.site: PokerStars site_id: 2
From Table gametypes
====================
type: ring category: holdem limit_type: fl
sb: 1 bb: 2 sbet: 2 bbet: 4
From Table hands From Table hands
================ ================
site_hand_no: 14519433154 hand_start: 2008-01-13 05:24:25 seat_count: 7 category: holdem site_hand_no: 14519433154 hand_start: 2008-01-13 05:24:25 seat_count: 7
Board cards: 4h 9s Ad Qc Ks Board cards: 4h 9s Ad Qc Ks
From Table hands_players From Table hands_players

View File

@ -16,25 +16,24 @@
#agpl-3.0.txt in the docs folder of the package. #agpl-3.0.txt in the docs folder of the package.
rm ../testdata/*.found.txt rm ../testdata/*.found.txt
../fpdb-python/fpdb_import.py -p$1 --file=../testdata/ps-holdem-ring-001to003.txt -x ../pyfpdb/fpdb_import.py -p$1 --file=../testdata/ps-holdem-ring-001to003.txt -x
../fpdb-python/fpdb_import.py -p$1 --file=../testdata/ps-holdem-ring-001to003.txt -x ../pyfpdb/fpdb_import.py -p$1 --file=../testdata/ps-holdem-ring-001to003.txt -x
../fpdb-python/fpdb_import.py -p$1 --file=../testdata/ftp-stud-hilo-ring-001.txt -x #../pyfpdb/fpdb_import.py -p$1 --file=../testdata/ftp-stud-hilo-ring-001.txt -x
../fpdb-python/fpdb_import.py -p$1 --file=../testdata/ftp-omaha-hi-pl-ring-001-005.txt -x #../pyfpdb/fpdb_import.py -p$1 --file=../testdata/ftp-omaha-hi-pl-ring-001-005.txt -x
echo "it should've reported first that it stored 3, then that it had 3 duplicates," echo "it should've reported first that it stored 3, then that it had 3 duplicates"
echo " then 1 stored, then 5 stored" #echo " then 1 stored, then 5 stored"
./print_hand.py -p$1 --hand=14519394979 > ../testdata/ps.14519394979.found.txt && colordiff ../testdata/ps.14519394979.found.txt ../testdata/ps.14519394979.expected.txt ./print_hand.py -p$1 --hand=14519394979 > ../testdata/ps.14519394979.found.txt && colordiff ../testdata/ps.14519394979.found.txt ../testdata/ps.14519394979.expected.txt
./print_hand.py -p$1 --hand=14519420999 > ../testdata/ps.14519420999.found.txt && colordiff ../testdata/ps.14519420999.found.txt ../testdata/ps.14519420999.expected.txt ./print_hand.py -p$1 --hand=14519420999 > ../testdata/ps.14519420999.found.txt && colordiff ../testdata/ps.14519420999.found.txt ../testdata/ps.14519420999.expected.txt
./print_hand.py -p$1 --hand=14519433154 > ../testdata/ps.14519433154.found.txt && colordiff ../testdata/ps.14519433154.found.txt ../testdata/ps.14519433154.expected.txt ./print_hand.py -p$1 --hand=14519433154 > ../testdata/ps.14519433154.found.txt && colordiff ../testdata/ps.14519433154.found.txt ../testdata/ps.14519433154.expected.txt
./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6367428246 > ../testdata/ftp.6367428246.found.txt && colordiff ../testdata/ftp.6367428246.found.txt ../testdata/ftp.6367428246.expected.txt #./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6367428246 > ../testdata/ftp.6367428246.found.txt && colordiff ../testdata/ftp.6367428246.found.txt ../testdata/ftp.6367428246.expected.txt
./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929537410 > ../testdata/ftp.6929537410.found.txt && colordiff ../testdata/ftp.6929537410.found.txt ../testdata/ftp.6929537410.expected.txt #./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929537410 > ../testdata/ftp.6929537410.found.txt && colordiff ../testdata/ftp.6929537410.found.txt ../testdata/ftp.6929537410.expected.txt
./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929553738 > ../testdata/ftp.6929553738.found.txt && colordiff ../testdata/ftp.6929553738.found.txt ../testdata/ftp.6929553738.expected.txt #./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929553738 > ../testdata/ftp.6929553738.found.txt && colordiff ../testdata/ftp.6929553738.found.txt ../testdata/ftp.6929553738.expected.txt
#./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929572212 > ../testdata/ftp.6929572212.found.txt && colordiff ../testdata/ftp.6929572212.found.txt ../testdata/ftp.6929572212.expected.txt #./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929572212 > ../testdata/ftp.6929572212.found.txt && colordiff ../testdata/ftp.6929572212.found.txt ../testdata/ftp.6929572212.expected.txt
#./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929576743 > ../testdata/ftp.6929576743.found.txt && colordiff ../testdata/ftp.6929576743.found.txt ../testdata/ftp.6929576743.expected.txt #./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929576743 > ../testdata/ftp.6929576743.found.txt && colordiff ../testdata/ftp.6929576743.found.txt ../testdata/ftp.6929576743.expected.txt
#./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929587483 > ../testdata/ftp.6929587483.found.txt && colordiff ../testdata/ftp.6929587483.found.txt ../testdata/ftp.6929587483.expected.txt #./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929587483 > ../testdata/ftp.6929587483.found.txt && colordiff ../testdata/ftp.6929587483.found.txt ../testdata/ftp.6929587483.expected.txt
echo "if everything was printed as expected this worked" echo "if everything was printed as expected this worked"
echo "todo: this doesnt verify correct gametype detection"