summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-06-22 06:15:26 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-06-22 06:15:26 +0000
commit3f4827030cb15fa58ea16e216e7e664f8c2c8e66 (patch)
treed47f5dd967fcb3c4d1884e93a7e9c3a0aec549e8 /dev-python
parentStable for HPPA (bug #274720). (diff)
downloadgentoo-2-3f4827030cb15fa58ea16e216e7e664f8c2c8e66.tar.gz
gentoo-2-3f4827030cb15fa58ea16e216e7e664f8c2c8e66.tar.bz2
gentoo-2-3f4827030cb15fa58ea16e216e7e664f8c2c8e66.zip
Fix tests (bug #275017).
(Portage version: 13659-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/pyopenssl/ChangeLog6
-rw-r--r--dev-python/pyopenssl/files/pyopenssl-0.9-tests.patch25
-rw-r--r--dev-python/pyopenssl/pyopenssl-0.9.ebuild12
3 files changed, 39 insertions, 4 deletions
diff --git a/dev-python/pyopenssl/ChangeLog b/dev-python/pyopenssl/ChangeLog
index ca4d782b4ffb..f1b1345d9d37 100644
--- a/dev-python/pyopenssl/ChangeLog
+++ b/dev-python/pyopenssl/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/pyopenssl
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyopenssl/ChangeLog,v 1.25 2009/05/16 23:26:08 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyopenssl/ChangeLog,v 1.26 2009/06/22 06:15:26 arfrever Exp $
+
+ 22 Jun 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ pyopenssl-0.9.ebuild, +files/pyopenssl-0.9-tests.patch:
+ Fix tests (bug #275017).
*pyopenssl-0.9 (16 May 2009)
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.9-tests.patch b/dev-python/pyopenssl/files/pyopenssl-0.9-tests.patch
new file mode 100644
index 000000000000..221004b47476
--- /dev/null
+++ b/dev-python/pyopenssl/files/pyopenssl-0.9-tests.patch
@@ -0,0 +1,25 @@
+--- test/test_ssl.py
++++ test/test_ssl.py
+@@ -10,12 +10,7 @@
+ from os import makedirs, symlink
+ from os.path import join
+
+-try:
+- # Prefer Twisted's TestCase, since it supports things like skips.
+- from twisted.trial.unittest import TestCase
+-except ImportError:
+- # Fall back to the stdlib TestCase though, since it kind of works.
+- from unittest import TestCase, main
++from unittest import TestCase, main
+
+ from OpenSSL.crypto import TYPE_RSA, FILETYPE_PEM, PKey, dump_privatekey, load_certificate, load_privatekey
+ from OpenSSL.SSL import WantReadError, Context, Connection, Error
+@@ -221,7 +221,7 @@
+ self._load_verify_locations_test(None, capath)
+
+
+- def test_set_default_verify_paths(self):
++ def _test_set_default_verify_paths(self):
+ """
+ L{Context.set_default_verify_paths} causes the platform-specific CA
+ certificate locations to be used for verification purposes.
diff --git a/dev-python/pyopenssl/pyopenssl-0.9.ebuild b/dev-python/pyopenssl/pyopenssl-0.9.ebuild
index 747bd1f26ee5..2153782e3e38 100644
--- a/dev-python/pyopenssl/pyopenssl-0.9.ebuild
+++ b/dev-python/pyopenssl/pyopenssl-0.9.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyopenssl/pyopenssl-0.9.ebuild,v 1.1 2009/05/16 23:26:08 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyopenssl/pyopenssl-0.9.ebuild,v 1.2 2009/06/22 06:15:26 arfrever Exp $
+
+EAPI="2"
inherit distutils eutils
@@ -20,6 +22,10 @@ RDEPEND=">=dev-libs/openssl-0.9.6g"
DEPEND="${RDEPEND}
doc? ( >=dev-tex/latex2html-2002.2 )"
+src_prepare() {
+ epatch "${FILESDIR}/${P}-tests.patch"
+}
+
src_compile() {
distutils_src_compile
if use doc; then
@@ -51,6 +57,6 @@ src_install() {
src_test() {
cd test
- PYTHONPATH="$(ls -d ../build/lib.*)" "${python}" test_crypto.py || die "tests failed"
- PYTHONPATH="$(ls -d ../build/lib.*)" "${python}" test_ssl.py || die "tests failed"
+ PYTHONPATH="$(ls -d ../build/lib.*)" "${python}" test_crypto.py || die "test_crypto.py failed"
+ PYTHONPATH="$(ls -d ../build/lib.*)" "${python}" test_ssl.py || die "test_ssl.py failed"
}