diff options
Diffstat (limited to 'dev-python/amqplib/files')
| -rw-r--r-- | dev-python/amqplib/files/amqplib-0.6.1_disable_socket_tests.patch | 17 | ||||
| -rw-r--r-- | dev-python/amqplib/files/amqplib-1.0.2-unicode_tests_py3.patch | 63 |
2 files changed, 0 insertions, 80 deletions
diff --git a/dev-python/amqplib/files/amqplib-0.6.1_disable_socket_tests.patch b/dev-python/amqplib/files/amqplib-0.6.1_disable_socket_tests.patch deleted file mode 100644 index c92e3cba64f4..000000000000 --- a/dev-python/amqplib/files/amqplib-0.6.1_disable_socket_tests.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -uNr amqplib-0.6.1.org/tests/client_0_8/run_all.py amqplib-0.6.1/tests/client_0_8/run_all.py ---- amqplib-0.6.1.org/tests/client_0_8/run_all.py 2011-07-06 16:21:22.000000000 -0400 -+++ amqplib-0.6.1/tests/client_0_8/run_all.py 2011-07-06 16:21:38.000000000 -0400 -@@ -28,13 +28,8 @@ - 'test_exceptions', - 'test_serialization', - 'test_basic_message', -- 'test_connection', -- 'test_channel', - ] - --if sys.version_info >= (2, 5): -- TEST_NAMES.append('test_with') -- - def main(): - suite = unittest.TestLoader().loadTestsFromNames(TEST_NAMES) - unittest.TextTestRunner(**settings.test_args).run(suite) diff --git a/dev-python/amqplib/files/amqplib-1.0.2-unicode_tests_py3.patch b/dev-python/amqplib/files/amqplib-1.0.2-unicode_tests_py3.patch deleted file mode 100644 index 14252a678203..000000000000 --- a/dev-python/amqplib/files/amqplib-1.0.2-unicode_tests_py3.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- a/tests/client_0_8/test_serialization.py 2011-07-18 00:11:48.000000000 -0400 -+++ b/tests/client_0_8/test_serialization.py 2012-03-02 16:54:35.000000000 -0500 -@@ -32,6 +32,18 @@ - # Python 2.5 and lower - bytes = str - -+#Unicode Strings for py3 tests -+uni_strings = { -+ 'u0100' : '\u0100', -+ 'hello' : 'hello', -+ 'a' : 'a', -+ 'another' : 'And something in unicode' -+} -+ -+if hasattr(str, 'decode'): -+ for wk, wv in uni_strings.iteritems(): -+ uni_strings[wk] = wv.decode("utf-8") -+ - import settings - - from amqplib.client_0_8.serialization import AMQPReader, AMQPWriter, GenericContent -@@ -232,12 +244,12 @@ - - def test_shortstr_unicode(self): - w = AMQPWriter() -- w.write_shortstr(u'hello') -+ w.write_shortstr(uni_strings['hello']) - s = w.getvalue() - self.assertEqualBinary(s, '\x05hello') - - r = AMQPReader(s) -- self.assertEqual(r.read_shortstr(), u'hello') -+ self.assertEqual(r.read_shortstr(),uni_strings['hello']) - - def test_long_shortstr(self): - w = AMQPWriter() -@@ -245,7 +257,7 @@ - - def test_long_shortstr_unicode(self): - w = AMQPWriter() -- self.assertRaises(ValueError, w.write_shortstr, u'\u0100' * 128) -+ self.assertRaises(ValueError, w.write_shortstr, uni_strings['u0100'] * 128) - - - # -@@ -273,7 +285,7 @@ - self.assertEqual(r.read_longstr(), str(val)) - - def test_longstr_unicode(self): -- val = u'a' * 512 -+ val = uni_strings['a'] * 512 - w = AMQPWriter() - w.write_longstr(val) - s = w.getvalue() -@@ -324,7 +336,7 @@ - 'foo': 7, - 'bar': Decimal('123345.1234'), - 'baz': 'this is some random string I typed', -- 'ubaz': u'And something in unicode', -+ 'ubaz': uni_strings['another'], - 'dday_aniv': datetime(1994, 6, 6), - 'more': { - 'abc': -123, |
