[Pkg-privacy-commits] [pyptlib] 03/13: Adapt test suite to work under Python 2.6
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:25:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch tpo-lucid-backport
in repository pyptlib.
commit 1dbde7b3e6f52d722aedb1c1065d373eb8d85b65
Author: Jérémy Bobbio <lunar at debian.org>
Date: Tue Apr 9 17:19:03 2013 +0000
Adapt test suite to work under Python 2.6
---
...h-unittest.TestCase-to-add-missing-assert.patch | 28 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 29 insertions(+)
diff --git a/debian/patches/0001-Monkey-patch-unittest.TestCase-to-add-missing-assert.patch b/debian/patches/0001-Monkey-patch-unittest.TestCase-to-add-missing-assert.patch
new file mode 100644
index 0000000..ebba348
--- /dev/null
+++ b/debian/patches/0001-Monkey-patch-unittest.TestCase-to-add-missing-assert.patch
@@ -0,0 +1,28 @@
+From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar at debian.org>
+Date: Tue, 9 Apr 2013 17:18:33 +0000
+Subject: Monkey-patch unittest.TestCase to add missing asserts for Python 2.6
+
+---
+ pyptlib/test/test_server.py | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/pyptlib/test/test_server.py b/pyptlib/test/test_server.py
+index a73fb8c..0df4451 100644
+--- a/pyptlib/test/test_server.py
++++ b/pyptlib/test/test_server.py
+@@ -4,6 +4,15 @@ import unittest
+ import pyptlib
+ import pyptlib.server
+
++if not hasattr(unittest.TestCase, 'assertIsNone'):
++ def assertIsNone(self, value):
++ self.assertTrue(value is None)
++ unittest.TestCase.assertIsNone = assertIsNone
++if not hasattr(unittest.TestCase, 'assertIn'):
++ def assertIn(self, value, collection):
++ self.assertTrue(value in collection)
++ unittest.TestCase.assertIn = assertIn
++
+ class testServer(unittest.TestCase):
+ def test_legit_environment(self):
+ """Legit environment."""
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6f5adda
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Monkey-patch-unittest.TestCase-to-add-missing-assert.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/pyptlib.git
More information about the Pkg-privacy-commits
mailing list