summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarien Zwart <marienz@gentoo.org>2006-02-13 22:26:13 +0000
committerMarien Zwart <marienz@gentoo.org>2006-02-13 22:26:13 +0000
commit84629b9411d4c2abddabe30c6ac474a0e1855208 (patch)
treec47baa7bdcf3cee29111a4d66e53bdba47c8b6ac /dev-python/twisted-mail
parentPatch to make the tests succeed with twisted 2.0, 2.1 and 2.2. No revision bu... (diff)
downloadgentoo-2-84629b9411d4c2abddabe30c6ac474a0e1855208.tar.gz
gentoo-2-84629b9411d4c2abddabe30c6ac474a0e1855208.tar.bz2
gentoo-2-84629b9411d4c2abddabe30c6ac474a0e1855208.zip
Patch to make the tests succeed with twisted 2.1 and 2.2. No revision bump because this only affects the tests.
(Portage version: 2660-svn)
Diffstat (limited to 'dev-python/twisted-mail')
-rw-r--r--dev-python/twisted-mail/ChangeLog8
-rw-r--r--dev-python/twisted-mail/Manifest19
-rw-r--r--dev-python/twisted-mail/files/twisted-mail-0.2.0-tests-2.2-compat.patch87
-rw-r--r--dev-python/twisted-mail/twisted-mail-0.2.0.ebuild10
4 files changed, 108 insertions, 16 deletions
diff --git a/dev-python/twisted-mail/ChangeLog b/dev-python/twisted-mail/ChangeLog
index 7586f4ed578f..6dd62c88dc62 100644
--- a/dev-python/twisted-mail/ChangeLog
+++ b/dev-python/twisted-mail/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/twisted-mail
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-mail/ChangeLog,v 1.5 2006/02/02 19:31:20 marienz Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-mail/ChangeLog,v 1.6 2006/02/13 22:26:13 marienz Exp $
+
+ 13 Feb 2006; Marien Zwart <marienz@gentoo.org>
+ +files/twisted-mail-0.2.0-tests-2.2-compat.patch,
+ twisted-mail-0.2.0.ebuild:
+ Patch to make the tests succeed with twisted 2.1 and 2.2. No revision bump
+ because this only affects the tests.
02 Feb 2006; Marien Zwart <marienz@gentoo.org> Manifest:
Fix rmd160 digests.
diff --git a/dev-python/twisted-mail/Manifest b/dev-python/twisted-mail/Manifest
index 9864f1102e14..73fb0a2532e8 100644
--- a/dev-python/twisted-mail/Manifest
+++ b/dev-python/twisted-mail/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 64085ae181ac15fdfd9b0fc334ef9561 ChangeLog 957
RMD160 53819b5b08a205365cd8817ebabf397d22dab994 ChangeLog 957
SHA256 e519762efde0c72eeb5479741256bbcf774a00661239d0eebcb15c8379c85666 ChangeLog 957
@@ -10,19 +7,15 @@ SHA256 cad16117a2a1173d124ad35db4a4373cfd5aed51179666863a255851f879566e files/di
MD5 f567d8c9949db20725b3bdc85f0d1d66 files/digest-twisted-mail-0.2.0 256
RMD160 e12ebceb8a0b7be09376519418d6b5b4b2652c2a files/digest-twisted-mail-0.2.0 256
SHA256 48d3647e3c3a9627c0c66be46410f5b4aa0656d45b58df5603b63ffe5bbe838b files/digest-twisted-mail-0.2.0 256
+MD5 d0a02dc24a2ee5370f9f9d67324ab5e0 files/twisted-mail-0.2.0-tests-2.2-compat.patch 3320
+RMD160 86b7051cc14eb38bcbf7084f3fcd68e6b7172f96 files/twisted-mail-0.2.0-tests-2.2-compat.patch 3320
+SHA256 32ba2b7488d8bd0f9cdd7a9688757c21064c9e869e7aec789529cd914ad8d59f files/twisted-mail-0.2.0-tests-2.2-compat.patch 3320
MD5 bc29fb845d6836abeba3eeff41da8476 metadata.xml 218
RMD160 0daf1f824cd7035b959dfc437279171ce5f1075b metadata.xml 218
SHA256 1ac3509e75b2cc8bf394a0c7e068039cc0152de1feae40a64b401365c9db67b2 metadata.xml 218
MD5 2486edf8a879a78a13dd75ac93c2deae twisted-mail-0.1.0-r1.ebuild 410
RMD160 71506cf97a4e46d076d4e34ecb287f656c8a764d twisted-mail-0.1.0-r1.ebuild 410
SHA256 44995681ab911c10a1625c4bd8efbf4e492a532f398e018c12d95ff584025e91 twisted-mail-0.1.0-r1.ebuild 410
-MD5 dfbf4dfe1c13cb6c31df379fc14d1b81 twisted-mail-0.2.0.ebuild 423
-RMD160 d74ca2bb1a0a763618113cc42d6575d5f92f6149 twisted-mail-0.2.0.ebuild 423
-SHA256 3ed34550ac66eec52eeacbb161a1b157ff1d72e023611fc6bdca7fcabc363e8e twisted-mail-0.2.0.ebuild 423
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFD4+XmJrHF4yAQTrARAoVRAJ4rDEIBPBX8Z5XxbG8WbMMaOaBv0ACguj+q
-gjuxHWoyKsYeZz+YP0AE9MA=
-=XNK3
------END PGP SIGNATURE-----
+MD5 8f3a21d37b9682ae1034f3167334a26e twisted-mail-0.2.0.ebuild 522
+RMD160 6948277e5690ce88e99a6a9226e9e044a0387109 twisted-mail-0.2.0.ebuild 522
+SHA256 ab1635f66f2b14ceb152d0247739fdfffea7bcfb78f209165fdcdfb07cd2f659 twisted-mail-0.2.0.ebuild 522
diff --git a/dev-python/twisted-mail/files/twisted-mail-0.2.0-tests-2.2-compat.patch b/dev-python/twisted-mail/files/twisted-mail-0.2.0-tests-2.2-compat.patch
new file mode 100644
index 000000000000..bb43988bc759
--- /dev/null
+++ b/dev-python/twisted-mail/files/twisted-mail-0.2.0-tests-2.2-compat.patch
@@ -0,0 +1,87 @@
+=== modified file 'twisted/mail/test/test_imap.py'
+--- twisted/mail/test/test_imap.py
++++ twisted/mail/test/test_imap.py
+@@ -2431,7 +2431,12 @@
+ self.failUnless(self.stillConnected)
+
+ def testIdleClientDoesDisconnect(self):
+- from twisted.test.test_task import Clock
++ try:
++ # 2.2 core has the Clock we need here
++ from twisted.test.time_helpers import Clock
++ except ImportError:
++ # previous versions of core had it here
++ from twisted.test.test_task import Clock
+ c = Clock()
+ c.install()
+ try:
+
+=== modified file 'twisted/mail/test/test_mail.py'
+--- twisted/mail/test/test_mail.py
++++ twisted/mail/test/test_mail.py
+@@ -17,7 +17,7 @@
+
+ from zope.interface import providedBy
+
+-from twisted.trial import unittest, util as tutil
++from twisted.trial import unittest
+ from twisted.mail import smtp
+ from twisted.mail import pop3
+ from twisted.names import dns
+@@ -221,6 +221,18 @@
+ def tearDown(self):
+ shutil.rmtree(self.d)
+
++ def _append(self, ignored, mbox):
++ d = mbox.appendMessage('TEST')
++ return self.assertFailure(d, Exception)
++
++ def _setState(self, ignored, mbox, rename=None, write=None, open=None):
++ if rename is not None:
++ mbox.AppendFactory._renameState = rename
++ if write is not None:
++ mbox.AppendFactory._writeState = write
++ if open is not None:
++ mbox.AppendFactory._openstate = open
++
+ def testAppend(self):
+ mbox = mail.maildir.MaildirMailbox(self.d)
+ mbox.AppendFactory = FailingMaildirMailboxAppendMessageTask
+@@ -233,17 +245,13 @@
+ self.assertEquals(len(mbox.getMessage(5).read()), 6)
+ # test in the right order: last to first error location.
+ mbox.AppendFactory._renamestate = False
+- self.failUnless(isinstance(unittest.deferredError(mbox.appendMessage("TEST")),
+- failure.Failure))
+- mbox.AppendFactory._renamestate = True
+- mbox.AppendFactory._writestate = False
+- self.failUnless(isinstance(unittest.deferredError(mbox.appendMessage("TEST")),
+- failure.Failure))
+- mbox.AppendFactory._writestate = True
+- mbox.AppendFactory._openstate = False
+- self.failUnless(isinstance(unittest.deferredError(mbox.appendMessage("TEST")),
+- failure.Failure))
+- mbox.AppendFactory._openstate = True
++ d = self._append(None, mbox)
++ d.addCallback(self._setState, mbox, rename=True, write=False)
++ d.addCallback(self._append, mbox)
++ d.addCallback(self._setState, mbox, write=True, open=False)
++ d.addCallback(self._append, mbox)
++ d.addCallback(self._setState, mbox, open=True)
++ return d
+
+
+ class MaildirAppendFileTestCase(unittest.TestCase):
+@@ -1097,11 +1105,6 @@
+ def tearDownClass(self):
+ smtp.DNSNAME = self.DNSNAME
+
+- def tearDown(self):
+- reactor.iterate()
+- reactor.iterate()
+- reactor.iterate()
+-
+ def testProcessAlias(self):
+ path = util.sibpath(__file__, 'process.alias.sh')
+ a = mail.alias.ProcessAlias(path, None, None)
+
diff --git a/dev-python/twisted-mail/twisted-mail-0.2.0.ebuild b/dev-python/twisted-mail/twisted-mail-0.2.0.ebuild
index 9caa06591a1d..3c588c7cba3b 100644
--- a/dev-python/twisted-mail/twisted-mail-0.2.0.ebuild
+++ b/dev-python/twisted-mail/twisted-mail-0.2.0.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-mail/twisted-mail-0.2.0.ebuild,v 1.2 2006/01/31 23:24:28 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-mail/twisted-mail-0.2.0.ebuild,v 1.3 2006/02/13 22:26:13 marienz Exp $
MY_PACKAGE=Mail
-inherit twisted
+inherit twisted eutils
DESCRIPTION="A Twisted Mail library, server and client."
@@ -12,3 +12,9 @@ KEYWORDS="~alpha ~ia64 ~sparc ~x86"
DEPEND=">=dev-python/twisted-2.1
dev-python/twisted-names"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-tests-2.2-compat.patch"
+}