summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2014-04-26 09:15:26 +0000
committerIan Delaney <idella4@gentoo.org>2014-04-26 09:15:26 +0000
commit5b939a7fc32347e4f33db2e0a69a3ad05ab45d91 (patch)
tree78a324edeb8965e64d6549a7a10872abb862eb6f
parentStable for amd64, wrt bug #508514 (diff)
downloadgentoo-2-5b939a7fc32347e4f33db2e0a69a3ad05ab45d91.tar.gz
gentoo-2-5b939a7fc32347e4f33db2e0a69a3ad05ab45d91.tar.bz2
gentoo-2-5b939a7fc32347e4f33db2e0a69a3ad05ab45d91.zip
patch to fix tests for py3
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
-rw-r--r--dev-python/celery/ChangeLog6
-rw-r--r--dev-python/celery/celery-3.1.10.ebuild12
-rw-r--r--dev-python/celery/files/celery-3.1.10-test.patch33
3 files changed, 42 insertions, 9 deletions
diff --git a/dev-python/celery/ChangeLog b/dev-python/celery/ChangeLog
index 453dd38e6b46..c0e707e75f18 100644
--- a/dev-python/celery/ChangeLog
+++ b/dev-python/celery/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/celery
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/celery/ChangeLog,v 1.30 2014/04/09 10:52:50 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/celery/ChangeLog,v 1.31 2014/04/26 09:15:26 idella4 Exp $
+
+ 26 Apr 2014; Ian Delaney <idella4@gentoo.org> +files/celery-3.1.10-test.patch,
+ celery-3.1.10.ebuild:
+ patch to fix tests for py3
*celery-3.1.10 (09 Apr 2014)
diff --git a/dev-python/celery/celery-3.1.10.ebuild b/dev-python/celery/celery-3.1.10.ebuild
index 4e1722a82528..1dddaf5fbdf5 100644
--- a/dev-python/celery/celery-3.1.10.ebuild
+++ b/dev-python/celery/celery-3.1.10.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/celery/celery-3.1.10.ebuild,v 1.1 2014/04/09 10:52:50 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/celery/celery-3.1.10.ebuild,v 1.2 2014/04/26 09:15:26 idella4 Exp $
EAPI=5
@@ -45,7 +45,8 @@ DEPEND="${RDEPEND}
dev-python/jinja[${PYTHON_USEDEP}]
dev-python/sqlalchemy[${PYTHON_USEDEP}] )"
-PATCHES=( "${FILESDIR}"/celery-docs.patch )
+PATCHES=( "${FILESDIR}"/celery-docs.patch
+ "${FILESDIR}"/${P}-test.patch)
python_compile_all() {
if use doc; then
@@ -56,12 +57,7 @@ python_compile_all() {
python_test() {
# https://github.com/celery/celery/issues/1964
- if python_is_python3; then
- nosetests -e test_get_task_meta_for -e test_cleanup -e test_restore_group \
- || die "Tests failed with ${EPYTHON}"
- else
- nosetests -e test_cleanup || die "Tests failed with ${EPYTHON}"
- fi
+ nosetests -e test_cleanup || die "Tests failed with ${EPYTHON}"
}
python_install_all() {
diff --git a/dev-python/celery/files/celery-3.1.10-test.patch b/dev-python/celery/files/celery-3.1.10-test.patch
new file mode 100644
index 000000000000..94fcac92fbf3
--- /dev/null
+++ b/dev-python/celery/files/celery-3.1.10-test.patch
@@ -0,0 +1,33 @@
+https://github.com/celery/celery/commit/fb48b1f357f7a416d1413d0056158a74191185af.diff
+diff --git a/celery/tests/backends/test_mongodb.py b/celery/tests/backends/test_mongodb.py
+index f7546d3..a32d9ed 100644
+--- a/celery/tests/backends/test_mongodb.py
++++ b/celery/tests/backends/test_mongodb.py
+@@ -196,9 +196,10 @@ def test_get_task_meta_for(self, mock_get_database):
+ mock_get_database.assert_called_once_with()
+ mock_database.__getitem__.assert_called_once_with(MONGODB_COLLECTION)
+ self.assertEqual(
+- ['status', 'task_id', 'date_done', 'traceback', 'result',
+- 'children'],
+- list(ret_val.keys()))
++ list(sorted(['status', 'task_id', 'date_done', 'traceback',
++ 'result', 'children'])),
++ list(sorted(ret_val.keys())),
++ )
+
+ @patch('celery.backends.mongodb.MongoBackend._get_database')
+ def test_get_task_meta_for_no_result(self, mock_get_database):
+@@ -253,8 +253,8 @@ def test_restore_group(self, mock_get_database):
+ mock_collection.find_one.assert_called_once_with(
+ {'_id': sentinel.taskset_id})
+ self.assertEqual(
+- ['date_done', 'result', 'task_id'],
+- list(ret_val.keys()),
++ list(sorted(['date_done', 'result', 'task_id'])),
++ list(sorted(ret_val.keys())),
+ )
+
+ @patch('celery.backends.mongodb.MongoBackend._get_database')
+#diff -ur celery-3.1.10.orig/celery/tests/backends/test_mongodb.py celery-3.1.10/celery/tests/backends/test_mongodb.py
+#--- celery-3.1.10.orig/celery/tests/backends/test_mongodb.py 2014-02-28 21:43:26.000000000 +0800
+#+++ celery-3.1.10/celery/tests/backends/test_mongodb.py 2014-04-17 11:43:00.818430253 +0800