I wrote at 22:37 on Sunday:
> (except for one, but I believe it relates to the binary protocol
> incompatibility and I will talk about this with Loic on IRC about it
> tomorrow).
FWIW, this is the test failure I have.
###########################################################################
RUNNING: ./test-pokerpackets.py
/var/lib/python-support/python2.5/simplejson/scanner.py:6: DeprecationWarning:
The sre module is deprecated, please import re.
from sre import VERBOSE, MULTILINE, DOTALL
test_PacketPokerMoneyTransfert (__main__.PokerPacketsTestCase) ... ok
test_PacketPokerPlayerArrive (__main__.PokerPacketsTestCase) ... ok
test_PacketPokerPlayerStats (__main__.PokerPacketsTestCase) ... ok
test_PacketPokerPlayersList (__main__.PokerPacketsTestCase) ... ok
test_PacketPokerTable (__main__.PokerPacketsTestCase) ... ok
test_PacketPokerUserInfo (__main__.PokerPacketsTestCase) ... ok
test_all (__main__.PokerPacketsTestCase) ... ERROR
test_verifyfactory (__main__.PokerPacketsTestCase) ... ok
======================================================================
ERROR: test_all (__main__.PokerPacketsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test-pokerpackets.py", line 57, in test_all
self.packetCheck(type = pokerpackets.PacketFactory[type_index])
File "./testpackets.py", line 42, in packetCheck
self.polute(packet)
File "./test-pokerpackets.py", line 38, in polute
testpackets.PacketsTestBase.polute(packet)
File "./testpackets.py", line 33, in polute
for (variable, default, pack_type) in info:
ValueError: too many values to unpack
----------------------------------------------------------------------
Ran 8 tests in 0.760s
FAILED (errors=1)
FAIL: test-pokerpackets.py
#############################################################################
I have not done a pydb step-through yet to try and figure out what value
it is trying to unpack, but I think it's because I've added the
PacketPokerTourneyAttrsList (as it passes when I take th edeclaration
out). Anyone see something obvious I'm missing?
Here's the TourneyAttrsList packet declaration by itself FWIW:
#############################################################################
PACKET_POKER_TOURNEY_ATTRS_LIST = 168 # 0xa8 # %SEQ%
PacketNames[PACKET_POKER_TOURNEY_ATTRS_LIST] = "POKER_TOURNEY_ATTRS_LIST"
class PacketPokerTourneyAttrsList(PacketList):
"""\
Semantics: a list of PACKET_POKER_TOURNEY_ATTRS packets sent as a
response to a PACKET_POKER_SELECT request.
Direction: server => client
packets: a list of PACKET_POKER_TOURNEY_ATTRS packets.
"""
type = PACKET_POKER_TOURNEY_ATTRS_LIST
info = PacketList.info + ( ('tourneyAttrs', 0, 'I') )
format = "!I"
format_size = calcsize(format)
def __init__(self, *args, **kwargs):
self.tourneyAttrs = kwargs.get("tourneyAttrs", 0)
PacketList.__init__(self, *args, **kwargs)
def pack(self):
return PacketList.pack(self) + pack(PacketPokerTourneyAttrsList.format,
self.tourneyAttrs)
def unpack(self, block):
block = PacketList.unpack(self, block)
(self.tourneyAttrs) = unpack(PacketPokerTourneyAttrsList.format,
block[:PacketPokerTourneyAttrsList.format_size])
return block[PacketPokerTourneyAttrsList.format_size:]
def calcsize(self):
return PacketList.calcsize(self) +
PacketPokerTourneyAttrsList.format_size
def __str__(self):
return PacketList.__str__(self) + "\n\ttourneyAttrs = %d" % (
self.tourneyAttrs )
PacketFactory[PACKET_POKER_TOURNEY_ATTRS_LIST] = PacketPokerTourneyAttrsList
#############################################################################
--
-- bkuhn
_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users