THP + test config: Add suppor for Carbon
Make THP script more robust when testing stats
This commit is contained in:
parent
08c8315cd0
commit
c5412caa14
|
@ -575,6 +575,7 @@ Left-Drag to Move"
|
||||||
<hhc site="Betfair" converter="BetfairToFpdb"/>
|
<hhc site="Betfair" converter="BetfairToFpdb"/>
|
||||||
<hhc site="OnGame" converter="OnGameToFpdb"/>
|
<hhc site="OnGame" converter="OnGameToFpdb"/>
|
||||||
<hhc site="Partouche" converter="PartoucheToFpdb"/>
|
<hhc site="Partouche" converter="PartoucheToFpdb"/>
|
||||||
|
<hhc site="Carbon" converter="CarbonToFpdb"/>
|
||||||
</hhcs>
|
</hhcs>
|
||||||
|
|
||||||
<supported_databases>
|
<supported_databases>
|
||||||
|
|
|
@ -85,12 +85,15 @@ def compare(leaf, importer, errors, site):
|
||||||
|
|
||||||
for stat in pstat:
|
for stat in pstat:
|
||||||
#print "pstat[%s][%s]: %s == %s" % (p, stat, pstat[stat], teststat[stat])
|
#print "pstat[%s][%s]: %s == %s" % (p, stat, pstat[stat], teststat[stat])
|
||||||
|
try:
|
||||||
if pstat[stat] == teststat[stat]:
|
if pstat[stat] == teststat[stat]:
|
||||||
# The stats match - continue
|
# The stats match - continue
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
# Stats don't match - Doh!
|
# Stats don't match - Doh!
|
||||||
errors.error_report(filename, hand, stat, ghash, testhash, p)
|
errors.error_report(filename, hand, stat, ghash, testhash, p)
|
||||||
|
except KeyError, e:
|
||||||
|
errors.error_report(filename, False, "KeyError: '%s'" % stat, False, False, p)
|
||||||
if errs > 0:
|
if errs > 0:
|
||||||
errors.error_report(filename, False, "Parse", False, False, False)
|
errors.error_report(filename, False, "Parse", False, False, False)
|
||||||
|
|
||||||
|
@ -134,6 +137,7 @@ def main(argv=None):
|
||||||
OnGameErrors = FpdbError('OnGame')
|
OnGameErrors = FpdbError('OnGame')
|
||||||
AbsoluteErrors = FpdbError('Absolute Poker')
|
AbsoluteErrors = FpdbError('Absolute Poker')
|
||||||
EverleafErrors = FpdbError('Everleaf Poker')
|
EverleafErrors = FpdbError('Everleaf Poker')
|
||||||
|
CarbonErrors = FpdbError('Carbon')
|
||||||
|
|
||||||
walk_testfiles("regression-test-files/cash/Stars/", compare, importer, PokerStarsErrors, "PokerStars")
|
walk_testfiles("regression-test-files/cash/Stars/", compare, importer, PokerStarsErrors, "PokerStars")
|
||||||
walk_testfiles("regression-test-files/tour/Stars/", compare, importer, PokerStarsErrors, "PokerStars")
|
walk_testfiles("regression-test-files/tour/Stars/", compare, importer, PokerStarsErrors, "PokerStars")
|
||||||
|
@ -145,8 +149,9 @@ def main(argv=None):
|
||||||
walk_testfiles("regression-test-files/cash/OnGame/", compare, importer, OnGameErrors, "OnGame")
|
walk_testfiles("regression-test-files/cash/OnGame/", compare, importer, OnGameErrors, "OnGame")
|
||||||
walk_testfiles("regression-test-files/cash/Absolute/", compare, importer, AbsoluteErrors, "Absolute")
|
walk_testfiles("regression-test-files/cash/Absolute/", compare, importer, AbsoluteErrors, "Absolute")
|
||||||
walk_testfiles("regression-test-files/cash/Everleaf/", compare, importer, EverleafErrors, "Everleaf")
|
walk_testfiles("regression-test-files/cash/Everleaf/", compare, importer, EverleafErrors, "Everleaf")
|
||||||
|
walk_testfiles("regression-test-files/cash/Carbon/", compare, importer, CarbonErrors, "Carbon")
|
||||||
|
|
||||||
totalerrors = PokerStarsErrors.errorcount + FTPErrors.errorcount + PartyPokerErrors.errorcount + BetfairErrors.errorcount + OnGameErrors.errorcount + AbsoluteErrors.errorcount + EverleafErrors.errorcount
|
totalerrors = PokerStarsErrors.errorcount + FTPErrors.errorcount + PartyPokerErrors.errorcount + BetfairErrors.errorcount + OnGameErrors.errorcount + AbsoluteErrors.errorcount + EverleafErrors.errorcount + CarbonErrors.errorcount
|
||||||
|
|
||||||
print "---------------------"
|
print "---------------------"
|
||||||
print "Total Errors: %d" % totalerrors
|
print "Total Errors: %d" % totalerrors
|
||||||
|
@ -158,6 +163,7 @@ def main(argv=None):
|
||||||
OnGameErrors.print_histogram()
|
OnGameErrors.print_histogram()
|
||||||
AbsoluteErrors.print_histogram()
|
AbsoluteErrors.print_histogram()
|
||||||
EverleafErrors.print_histogram()
|
EverleafErrors.print_histogram()
|
||||||
|
CarbonErrors.print_histogram()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user