Hello Thomas,
I tested twotp-0.2 on my ibook G4 (PowerPC).
Python:
Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Twisted:
Twisted-2.5.0
Erlang OTP:
otp_src_R12B-1
Problem:
In the Dict and Set test the order is reversed compared to the reference.
I tried to switch the order to
self.packer.packOneTerm(set([Atom("bar"), Atom("foo")])),
but I get the same result.
Cheers,
Stephan
Here are the test results:
===============================================================================
[FAIL]: erlang.test.test_packer.PackTestCase.test_packDict
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/erlang/test/test_packer.py", line 212, in test_packDict
"h\td\x00\x04dicta\x02a\x10a\x10a\x08aPa0h\x10jjjjjjjjjjjjjjjjh"
twisted.trial.unittest.FailTest: 'h\td\x00\x04dicta\x02a\x10a\x10a\x08aPa0h\x10jjjjjjjjjjjjjjjjh\x01h\x10l\x00\x00\x00\x01l\x00\x00\x00\x02d\x00\x03fook\x00\x03barjjl\x00\x00\x00\x01l\x00\x00\x00\x02d\x00\x04spama\x01jjjjjjjjjjjjjjjj' != 'h\td\x00\x04dicta\x02a\x10a\x10a\x08aPa0h\x10jjjjjjjjjjjjjjjjh\x01h\x10l\x00\x00\x00\x01l\x00\x00\x00\x02d\x00\x04spama\x01jjl\x00\x00\x00\x01l\x00\x00\x00\x02d\x00\x03fook\x00\x03barjjjjjjjjjjjjjjjj'
===============================================================================
[FAIL]: erlang.test.test_packer.PackTestCase.test_packSet
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/erlang/test/test_packer.py", line 224, in test_packSet
"h\td\x00\x04setsa\x02a\x10a\x10a\x08aPa0h\x10jjjjjjjjjjjjjjjj"
twisted.trial.unittest.FailTest: 'h\td\x00\x04setsa\x02a\x10a\x10a\x08aPa0h\x10jjjjjjjjjjjjjjjjh\x01h\x10l\x00\x00\x00\x01d\x00\x03foojl\x00\x00\x00\x01d\x00\x03barjjjjjjjjjjjjjjj' != 'h\td\x00\x04setsa\x02a\x10a\x10a\x08aPa0h\x10jjjjjjjjjjjjjjjjh\x01h\x10l\x00\x00\x00\x01d\x00\x03barjl\x00\x00\x00\x01d\x00\x03foojjjjjjjjjjjjjjj'
===============================================================================
[ERROR]: erlang.test.test_epmd.PersistentPortMapperFactoryTestCase.test_publish
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/erlang/test/test_epmd.py", line 296, in test_publish
self.assertIsInstance(self.factory.listen[0][1],
exceptions.AttributeError: 'PersistentPortMapperFactoryTestCase' object has no attribute 'assertIsInstance'
===============================================================================
[ERROR]: erlang.test.test_node.UtilitiesTestCase.test_getHostName
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/erlang/test/test_node.py", line 218, in test_getHostName
self.assertIsInstance(hostName, str)
exceptions.AttributeError: 'UtilitiesTestCase' object has no attribute 'assertIsInstance'
-------------------------------------------------------------------------------
Ran 137 tests in 1.951s
FAILED (failures=2, errors=2, successes=133)
Thanks for the report! Indeed, In can't rely on order in set and dict objects, because they are platform dependent. I'll try to fix the tests as soon as possible. Note that this is only a problem in the tests, it should not affect twotp by itself.