[Pkg-privacy-commits] [obfsproxy] 03/17: Adapt test suite to work under Python 2.6

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:02:28 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 obfsproxy.

commit 9d18a4f70e018b4be20214781e1d61d215920540
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Tue Apr 9 17:31:02 2013 +0000

    Adapt test suite to work under Python 2.6
---
 ...h-twisted.trial.unittest.TestCase-to-add-.patch | 24 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 25 insertions(+)

diff --git a/debian/patches/0001-Monkey-patch-twisted.trial.unittest.TestCase-to-add-.patch b/debian/patches/0001-Monkey-patch-twisted.trial.unittest.TestCase-to-add-.patch
new file mode 100644
index 0000000..c7b78ed
--- /dev/null
+++ b/debian/patches/0001-Monkey-patch-twisted.trial.unittest.TestCase-to-add-.patch
@@ -0,0 +1,24 @@
+From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar at debian.org>
+Date: Tue, 9 Apr 2013 17:30:50 +0000
+Subject: Monkey-patch twisted.trial.unittest.TestCase to add missing asserts
+ for Python 2.6
+
+---
+ obfsproxy/test/__init__.py |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/obfsproxy/test/__init__.py b/obfsproxy/test/__init__.py
+index e69de29..2e8f6f6 100644
+--- a/obfsproxy/test/__init__.py
++++ b/obfsproxy/test/__init__.py
+@@ -0,0 +1,10 @@
++import twisted.trial.unittest
++
++if not hasattr(twisted.trial.unittest.TestCase, 'assertIsNone'):
++    def assertIsNone(self, value):
++        self.assertTrue(value is None)
++    twisted.trial.unittest.TestCase.assertIsNone = assertIsNone
++if not hasattr(twisted.trial.unittest.TestCase, 'assertListEqual'):
++    def assertListEqual(self, l1, l2):
++        self.assertTrue(l1 == l2)
++    twisted.trial.unittest.TestCase.assertListEqual = assertListEqual
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4eeb8e3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Monkey-patch-twisted.trial.unittest.TestCase-to-add-.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfsproxy.git



More information about the Pkg-privacy-commits mailing list