Hello community, here is the log from the commit of package python-pamqp for openSUSE:Factory checked in at 2018-09-14 00:01:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pamqp (Old) and /work/SRC/openSUSE:Factory/.python-pamqp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pamqp" Fri Sep 14 00:01:31 2018 rev:2 rq:635408 version:1.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pamqp/python-pamqp.changes 2018-08-31 10:47:54.915455773 +0200 +++ /work/SRC/openSUSE:Factory/.python-pamqp.new/python-pamqp.changes 2018-09-14 00:01:35.205944759 +0200 @@ -1,0 +2,6 @@ +Wed Sep 12 10:59:50 CEST 2018 - [email protected] + +- Add 776d086553bd04630cb1d9e2f429c7bf05b1ca23.patch fixing tests + on 32bit archs. See https://github.com/gmr/pamqp/issues/11 + +------------------------------------------------------------------- New: ---- 776d086553bd04630cb1d9e2f429c7bf05b1ca23.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pamqp.spec ++++++ --- /var/tmp/diff_new_pack.4dHJKj/_old 2018-09-14 00:01:35.989944160 +0200 +++ /var/tmp/diff_new_pack.4dHJKj/_new 2018-09-14 00:01:35.993944156 +0200 @@ -25,6 +25,8 @@ Group: Development/Languages/Python URL: https://github.com/gmr/pamqp Source: https://github.com/gmr/pamqp/archive/%{version}.tar.gz +# PATCH-FIX-UPSTREAM 776d086553bd04630cb1d9e2f429c7bf05b1ca23.patch [email protected] +Patch: 776d086553bd04630cb1d9e2f429c7bf05b1ca23.patch BuildRequires: %{python_module mock} BuildRequires: %{python_module nose} BuildRequires: %{python_module setuptools} @@ -46,6 +48,7 @@ %prep %setup -q -n pamqp-%{version} +%autopatch -p1 %build %python_build ++++++ 776d086553bd04630cb1d9e2f429c7bf05b1ca23.patch ++++++ >From 776d086553bd04630cb1d9e2f429c7bf05b1ca23 Mon Sep 17 00:00:00 2001 From: "Gavin M. Roy" <[email protected]> Date: Tue, 11 Sep 2018 10:55:09 -0400 Subject: [PATCH] Address testing on 32-bit platforms (#11) --- tests/decoding_tests.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) --- a/tests/decoding_tests.py +++ b/tests/decoding_tests.py @@ -1,5 +1,6 @@ # -*- encoding: utf-8 -*- import decimal +import struct import time try: import unittest2 as unittest @@ -14,6 +15,9 @@ if PYTHON3: unicode = bytes basestring = bytes +PLATFORM_32BIT = (struct.calcsize('P') * 8) == 32 +PLATFORM_64BIT = (struct.calcsize('P') * 8) == 64 + def utf8(value): if PYTHON3: @@ -145,10 +149,16 @@ class CodecDecodeTests(unittest.TestCase value = b'\x7f\xff\xff\xff\xff\xff\xff\xf8' self.assertEqual(decode.long_long_int(value)[0], 8) + @unittest.skipIf(PLATFORM_32BIT, 'Skipped on 32-bit platforms') def test_decode_long_long_int_data_type(self): value = b'\x7f\xff\xff\xff\xff\xff\xff\xf8' self.assertIsInstance(decode.long_long_int(value)[1], int) + @unittest.skipIf(PLATFORM_64BIT, 'Skipped on 64-bit platforms') + def test_decode_long_long_int_data_type(self): + value = b'\x7f\xff\xff\xff\xff\xff\xff\xf8' + self.assertIsInstance(decode.long_long_int(value)[1], long) + def test_decode_long_long_int_invalid_value(self): self.assertRaises(ValueError, decode.long_long_int, None) @@ -358,10 +368,16 @@ class CodecDecodeTests(unittest.TestCase value = b'\x7f\xff\xff\xff\xff\xff\xff\xf8' self.assertEqual(decode.by_type(value, 'longlong')[0], 8) + @unittest.skipIf(PLATFORM_32BIT, 'Skipped on 32-bit platforms') def test_decode_by_type_long_long_data_type(self): value = b'\x7f\xff\xff\xff\xff\xff\xff\xf8' self.assertIsInstance(decode.by_type(value, 'longlong')[1], int) + @unittest.skipIf(PLATFORM_64BIT, 'Skipped on 64-bit platforms') + def test_decode_by_type_long_long_data_type(self): + value = b'\x7f\xff\xff\xff\xff\xff\xff\xf8' + self.assertIsInstance(decode.by_type(value, 'longlong')[1], long) + def test_decode_by_type_long_long_invalid_value(self): self.assertRaises(ValueError, decode.by_type, None, 'longlong') @@ -512,10 +528,16 @@ class CodecDecodeTests(unittest.TestCase value = b'l\x7f\xff\xff\xff\xff\xff\xff\xf8' self.assertEqual(decode._embedded_value(value)[0], 9) + @unittest.skipIf(PLATFORM_32BIT, 'Skipped on 32-bit platforms') def test_decode_embedded_value_long_long_data_type(self): value = b'l\x7f\xff\xff\xff\xff\xff\xff\xf8' self.assertIsInstance(decode._embedded_value(value)[1], int) + @unittest.skipIf(PLATFORM_64BIT, 'Skipped on 64-bit platforms') + def test_decode_embedded_value_long_long_data_type(self): + value = b'l\x7f\xff\xff\xff\xff\xff\xff\xf8' + self.assertIsInstance(decode._embedded_value(value)[1], long) + def test_decode_embedded_value_long_long_value(self): value = b'l\x7f\xff\xff\xff\xff\xff\xff\xf8' self.assertEqual(decode._embedded_value(value)[1],
