Opened 11 years ago

Last modified 10 years ago

#409 defect closed fixed (fixed)

test_mail fails on Windows

Reported by: PenguinOfDoom Owned by: exarkun
Priority: high Milestone:
Component: mail Keywords:
Cc: exarkun, PenguinOfDoom Branch:
Author: Launchpad Bug:

Description


Change History (2)

comment:1 Changed 11 years ago by PenguinOfDoom

The permission denied test cases fail because files are deleted before they are
closed (yay, broken locking semantics on Windows). Not sure about testMailbox.

===============================================================================
FAILURE: testMailbox (twisted.test.test_mail.MaildirTestCase)
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pahan/Twisted/twisted/trial/unittest.py", line 252, in _runPhase
    getattr(self, self.__testMethodName)()
  File "/home/pahan/Twisted/twisted/trial/unittest.py", line 274, in _main
    if expr: raise self.failureException, msg
  File "/home/pahan/Twisted/twisted/trial/runner.py", line 102, in runTest
  File "z:\Twisted\twisted\test\test_mail.py", line 239, in testMailbox
    self.assertEquals(mb.listMessages(), range(1, 11))
  File "/home/pahan/Twisted/twisted/trial/unittest.py", line 127, in failUnlessEqual
    """Converts a sys.exc_info()-style tuple of values into a string."""
FailTest: [8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L] != [1, 2, 3, 4, 5, 6, 7, 8,
9, 10]
===============================================================================
ERROR: testRelayDelivery (twisted.test.test_mail.LiveFireExercise)
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pahan/Twisted/twisted/trial/unittest.py", line 252, in _runPhase
    getattr(self, self.__testMethodName)()
  File "z:\Twisted\twisted\test\test_mail.py", line 772, in tearDown
    shutil.rmtree(d)
  File "c:\python23\lib\shutil.py", line 140, in rmtree
    raise exc[0], (exc[1][0], exc[1][1] + ' removing '+arg)
OSError: [Errno 13] Permission denied removing
insertionQueue\1888_1069302858.44_0_13058096-D
===============================================================================
ERROR: testMailData (twisted.test.test_mail.RelayerTestCase)
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pahan/Twisted/twisted/trial/unittest.py", line 252, in _runPhase
    getattr(self, self.__testMethodName)()
  File "/home/pahan/Twisted/twisted/trial/unittest.py", line 274, in _main
    if expr: raise self.failureException, msg
  File "/home/pahan/Twisted/twisted/trial/runner.py", line 102, in runTest
  File "z:\Twisted\twisted\test\test_mail.py", line 543, in testMailData
    self.R.sentMail(250, None, None, None, None)
  File "z:\Twisted\twisted\mail\relay.py", line 112, in sentMail
    os.remove(self.names[0]+'-D')
OSError: [Errno 13] Permission denied:
'twisted.test.test_mail\\RelayerTestCase\\testMailData\\1888.1\\body-0-D'
===============================================================================
ERROR: testMailFrom (twisted.test.test_mail.RelayerTestCase)
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pahan/Twisted/twisted/trial/unittest.py", line 252, in _runPhase
    getattr(self, self.__testMethodName)()
  File "/home/pahan/Twisted/twisted/trial/unittest.py", line 274, in _main
    if expr: raise self.failureException, msg
  File "/home/pahan/Twisted/twisted/trial/runner.py", line 102, in runTest
  File "z:\Twisted\twisted\test\test_mail.py", line 530, in testMailFrom
    self.R.sentMail(250, None, None, None, None)
  File "z:\Twisted\twisted\mail\relay.py", line 112, in sentMail
    os.remove(self.names[0]+'-D')
OSError: [Errno 13] Permission denied:
'twisted.test.test_mail\\RelayerTestCase\\testMailFrom\\1888.1\\body-0-D'
===============================================================================
ERROR: testMailTo (twisted.test.test_mail.RelayerTestCase)
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pahan/Twisted/twisted/trial/unittest.py", line 252, in _runPhase
    getattr(self, self.__testMethodName)()
  File "/home/pahan/Twisted/twisted/trial/unittest.py", line 274, in _main
    if expr: raise self.failureException, msg
  File "/home/pahan/Twisted/twisted/trial/runner.py", line 102, in runTest
  File "z:\Twisted\twisted\test\test_mail.py", line 536, in testMailTo
    self.R.sentMail(250, None, None, None, None)
  File "z:\Twisted\twisted\mail\relay.py", line 112, in sentMail
    os.remove(self.names[0]+'-D')
OSError: [Errno 13] Permission denied:
'twisted.test.test_mail\\RelayerTestCase\\testMailTo\\1888.1\\body-0-D'
-------------------------------------------------------------------------------
Ran 42 tests in 28.015s

FAILED (failures=1, errors=4)

comment:2 Changed 10 years ago by exarkun

twisted.mail has been marked posix-only for a while.  The tests have the
appropriate skips set.
Note: See TracTickets for help on using tickets.