[Python-modules-commits] [python-cement] 12/13: merge patched into master

Michael Fladischer fladi at moszumanska.debian.org
Thu Sep 8 08:26:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch master
in repository python-cement.

commit 2726cabce76c681d9ba40392ce35e5e4c9502ff7
Merge: 584307e fdc13a0
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Mon Jul 18 20:04:57 2016 +0200

    merge patched into master

 debian/.git-dpm                                    |  4 +-
 ...-Skip-tests-if-redis-package-is-not-found.patch | 38 +++++++++++++++++++
 ...Skip-tests-if-pybars-package-is-not-found.patch | 43 ++++++++++++++++++++++
 debian/patches/series                              |  2 +
 tests/ext/handlebars_tests.py                      | 13 ++++++-
 tests/ext/redis_tests.py                           |  7 +++-
 6 files changed, 102 insertions(+), 5 deletions(-)

diff --cc debian/.git-dpm
index 29ce64c,0000000..9f3d205
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
 +# see git-dpm(1) from git-dpm package
- dc6701b6981ea2b2490551f76ac1d64f0927fd44
- dc6701b6981ea2b2490551f76ac1d64f0927fd44
++fdc13a0fe2adb52ec2a77b4464b13d297251e8f8
++fdc13a0fe2adb52ec2a77b4464b13d297251e8f8
 +b82fca7bb8fa81246ba820510a1a6b3d6488223e
 +b82fca7bb8fa81246ba820510a1a6b3d6488223e
 +python-cement_2.10.0.orig.tar.gz
 +b36f995240475e3d8ee35e94700d63c84910bd88
 +179447
diff --cc debian/patches/0004-Skip-tests-if-redis-package-is-not-found.patch
index 0000000,0000000..0bec162
new file mode 100644
--- /dev/null
+++ b/debian/patches/0004-Skip-tests-if-redis-package-is-not-found.patch
@@@ -1,0 -1,0 +1,38 @@@
++From 159c9974debeeca6b640d5615b6d19b46d0050bd Mon Sep 17 00:00:00 2001
++From: Michael Fladischer <FladischerMichael at fladi.at>
++Date: Mon, 18 Jul 2016 20:04:09 +0200
++Subject: Skip tests if redis package is not found.
++
++---
++ tests/ext/redis_tests.py | 7 ++++++-
++ 1 file changed, 6 insertions(+), 1 deletion(-)
++
++diff --git a/tests/ext/redis_tests.py b/tests/ext/redis_tests.py
++index 6fea662..cc71bda 100644
++--- a/tests/ext/redis_tests.py
+++++ b/tests/ext/redis_tests.py
++@@ -1,18 +1,23 @@
++ """Tests for cement.ext.ext_redis."""
++ 
++ import sys
++-import redis
++ from time import sleep
++ from random import random
++ from cement.core import handler
++ from cement.utils import test
++ from cement.utils.misc import init_defaults
++ 
+++try:
+++    import redis
+++except ImportError:
+++    redis = None
++ 
++ class RedisExtTestCase(test.CementTestCase):
++ 
++     def setUp(self):
++         super(RedisExtTestCase, self).setUp()
+++        if not redis:
+++            self.skipTest("No redis module installed")
++         self.key = "cement-tests-random-key-%s" % random()
++         defaults = init_defaults('tests', 'cache.redis')
++         defaults['cache.redis']['host'] = '127.0.0.1'
diff --cc debian/patches/0005-Skip-tests-if-pybars-package-is-not-found.patch
index 0000000,0000000..421837b
new file mode 100644
--- /dev/null
+++ b/debian/patches/0005-Skip-tests-if-pybars-package-is-not-found.patch
@@@ -1,0 -1,0 +1,43 @@@
++From fdc13a0fe2adb52ec2a77b4464b13d297251e8f8 Mon Sep 17 00:00:00 2001
++From: Michael Fladischer <FladischerMichael at fladi.at>
++Date: Mon, 18 Jul 2016 20:04:37 +0200
++Subject: Skip tests if pybars package is not found.
++
++---
++ tests/ext/handlebars_tests.py | 13 +++++++++++--
++ 1 file changed, 11 insertions(+), 2 deletions(-)
++
++diff --git a/tests/ext/handlebars_tests.py b/tests/ext/handlebars_tests.py
++index 91779cd..c81b7fd 100644
++--- a/tests/ext/handlebars_tests.py
+++++ b/tests/ext/handlebars_tests.py
++@@ -6,6 +6,11 @@ from cement.core import exc, foundation, handler, backend, controller
++ from cement.utils import test
++ from nose.plugins.attrib import attr
++ 
+++try:
+++    import pybars
+++except ImportError:
+++    pybars = None
+++
++ class HandlebarsTestApp(test.TestApp):
++     class Meta:
++         extensions = ['handlebars']
++@@ -14,11 +19,15 @@ class HandlebarsTestApp(test.TestApp):
++         template_dirs = []
++         handlebars_helpers = {}
++         handlebars_partials = ['test_partial_template.handlebars']
++-        
++- at attr('ext_handlebars')        
+++
+++ at attr('ext_handlebars')
++ class HandlebarsExtTestCase(test.CementExtTestCase):
++     app_class = HandlebarsTestApp
++ 
+++    def setUp(self):
+++        if not pybars:
+++            self.skipTest("No pybars module installed")
+++
++     def test_handlebars(self):
++         self.app.setup()
++         rando = random.random()
diff --cc debian/patches/series
index e15ee3f,0000000..a05eb03
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,3 -1,0 +1,5 @@@
 +0001-Remove-badges-and-mailinglist-signup-form-from-docum.patch
 +0002-Don-t-use-license-text-in-documentation.patch
 +0003-Do-not-install-examples-package.patch
++0004-Skip-tests-if-redis-package-is-not-found.patch
++0005-Skip-tests-if-pybars-package-is-not-found.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-cement.git



More information about the Python-modules-commits mailing list