[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/mail/tests/ Folder src/zope/app/mail/tests/mailbox should not be ignored

Dmitry Vasiliev dima at hlabs.spb.ru
Mon May 17 03:28:44 EDT 2004


Log message for revision 24765:
Folder src/zope/app/mail/tests/mailbox should not be ignored
by SVN, but just removed inside test_directives.tearDown() method.



-=-

Property changes on: Zope3/trunk/src/zope/app/mail/tests
___________________________________________________________________
Name: svn:ignore
   - mailbox


Modified: Zope3/trunk/src/zope/app/mail/tests/test_directives.py
===================================================================
--- Zope3/trunk/src/zope/app/mail/tests/test_directives.py	2004-05-17 06:13:48 UTC (rev 24764)
+++ Zope3/trunk/src/zope/app/mail/tests/test_directives.py	2004-05-17 07:28:43 UTC (rev 24765)
@@ -16,6 +16,7 @@
 $Id$
 """
 import os
+import shutil
 import unittest
 import threading
 import time
@@ -52,6 +53,8 @@
 
 class DirectivesTest(PlacelessSetup, unittest.TestCase):
 
+    mailbox = os.path.join(os.path.dirname(__file__), 'mailbox')
+
     def setUp(self):
         super(DirectivesTest, self).setUp()
         self.testMailer = Mailer()
@@ -62,7 +65,7 @@
         self.context = xmlconfig.file("mail.zcml", zope.app.mail.tests)
         self.orig_maildir = delivery.Maildir
         delivery.Maildir = MaildirStub
-        
+
     def tearDown(self):
         delivery.Maildir = self.orig_maildir
 
@@ -74,13 +77,13 @@
             if isinstance(thread, QueueProcessorThread):
                 thread.stop()
                 thread.join()
-                
+
+        shutil.rmtree(self.mailbox, True)
+
     def testQueuedDelivery(self):
         delivery = zapi.getUtility(None, IMailDelivery, "Mail")
         self.assertEqual('QueuedMailDelivery', delivery.__class__.__name__)
-        testdir = os.path.dirname(zope.app.mail.tests.__file__)
-        self.assertEqual(os.path.join(testdir, 'mailbox'),
-                         delivery.queuePath)
+        self.assertEqual(self.mailbox, delivery.queuePath)
 
     def testDirectDelivery(self):
         delivery = zapi.getUtility(None, IMailDelivery, "Mail2")




More information about the Zope3-Checkins mailing list