diff options
author | Marien Zwart <marienz@gentoo.org> | 2006-02-13 22:26:13 +0000 |
---|---|---|
committer | Marien Zwart <marienz@gentoo.org> | 2006-02-13 22:26:13 +0000 |
commit | 84a6f333dd14ba9005a8a7febc5213b9cf9c0aa3 (patch) | |
tree | 0a08b0c2498de71bb10dc88872a47fa55e069307 | |
parent | Patch to make the tests succeed with twisted 2.0, 2.1 and 2.2. No revision bu... (diff) | |
download | historical-84a6f333dd14ba9005a8a7febc5213b9cf9c0aa3.tar.gz historical-84a6f333dd14ba9005a8a7febc5213b9cf9c0aa3.tar.bz2 historical-84a6f333dd14ba9005a8a7febc5213b9cf9c0aa3.zip |
Patch to make the tests succeed with twisted 2.1 and 2.2. No revision bump because this only affects the tests.
Package-Manager: portage-2660-svn
-rw-r--r-- | dev-python/twisted-mail/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/twisted-mail/Manifest | 10 | ||||
-rw-r--r-- | dev-python/twisted-mail/files/twisted-mail-0.2.0-tests-2.2-compat.patch | 87 | ||||
-rw-r--r-- | dev-python/twisted-mail/twisted-mail-0.2.0.ebuild | 10 |
4 files changed, 112 insertions, 3 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 e3b4d88bee8c..5fd0929d6b4c 100644 --- a/dev-python/twisted-mail/Manifest +++ b/dev-python/twisted-mail/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + MD5 515b881bf5c16d4b9531f6e5c34ddec2 ChangeLog 1204 RMD160 75c4e04f7ca9d130fcff0072584800bdbf0f2801 ChangeLog 1204 SHA256 79dcc72e17880fa2996e58ff364d890a836e939c63c00906d801d0a852449411 ChangeLog 1204 @@ -19,3 +22,10 @@ SHA256 44995681ab911c10a1625c4bd8efbf4e492a532f398e018c12d95ff584025e91 twisted- MD5 1712699060d415e84f862c769fa79554 twisted-mail-0.2.0.ebuild 521 RMD160 2ed32b41d8b2be627a0d23c8eded28616b681e9f twisted-mail-0.2.0.ebuild 521 SHA256 4bf4475c846d43e9ab8c1d6e0bcb44083966a0b58ef742ab08d98107df6985f3 twisted-mail-0.2.0.ebuild 521 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.2 (GNU/Linux) + +iD8DBQFD8QeQW78445TWHXcRAmi0AJ9aAnbZxDZ0n2ViWezTK/z303/icgCggupL +uteUUxZfd74Y4eI1XB3MrBU= +=72dh +-----END PGP SIGNATURE----- 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" +} |