Closed mcepl closed 6 years ago
Actually the issue is both of these are 32bit platforms, thus long long != int conversion there.
The implications of supporting a 32-bit system are a bit interesting. The field type isn't actively used in AMQP as far as the core protocol/frames, so this failed test isn't indicating a major issue.
Most likely the data type is coming back as a long, but I believe the error is being raised by Unittest.TestCase.assertEqual
complaining about type differences. I'm wondering if it makes sense to make conditional unittests for 32 bit platforms for these three tests.
I've updated the tests to address this (I think). It'd be great if you can test against master or 1.7 and let me know.
Will close this. Feel to free open if the latest version didn't address this.
I can confirm the patch fixes the issue :)
Actually with the 2.0 release one of the tests fail again:
[ 11s] FAIL: test_decode_embedded_value_long_uint_data_type (test_decoding.CodecDecodeTests)
[ 11s] ----------------------------------------------------------------------
[ 11s] Traceback (most recent call last):
[ 11s] File "/home/abuild/rpmbuild/BUILD/pamqp-2.0.0/tests/test_decoding.py", line 587, in test_decode_embedded_value_long_uint_data_type
[ 11s] self.assertIsInstance(decode._embedded_value(value)[1], int)
[ 11s] AssertionError: 4294967295L is not an instance of <type 'int'>
Python 2?
Yes, Python 2 only. The testsuite passes without problems on Python 3.7.
Tests
test_decode_by_type_long_long_data_type
,test_decode_embedded_value_long_long_data_type
, andtest_decode_long_long_int_data_type
fail on i586 and armv7l with the latest development version of OpenSUSE. I am not sure what's the unifying link between these two architectures (armv7l is 64bit, isn't it?), perhaps too small memory or something?build logs on i586 build logs on armv7l