Message11353

Author stefan.richthofer
Recipients stefan.richthofer
Date 2017-05-05.11:52:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493985172.86.0.0660168173335.issue2586@psf.upfronthosting.co.za>
In-reply-to
Content
On Linux Mint 64Bit, Java 8 I observe test_mailbox to fail. Note that it doesn't fail on Windows (or is skipped there, I currently cannot tell).
Also note that in discussion of #2585 I learned that this failure isn't commonly visible.

======================================================================
FAIL: test_file_permissions (__main__.TestMaildir)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_mailbox.py", line 787, in test_file_permissions
    self.assertEqual(mode & 0111, 0)
AssertionError: 73 != 0

======================================================================
FAIL: test_folder_file_perms (__main__.TestMaildir)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_mailbox.py", line 804, in test_folder_file_perms
    self.assertFalse((perms & 0111)) # Execute bits should all be off.
AssertionError: 73 is not false

======================================================================
FAIL: test_file_perms (__main__.TestMbox)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_mailbox.py", line 1011, in test_file_perms
    self.assertFalse((perms & 0111)) # Execute bits should all be off.
AssertionError: 73 is not false

======================================================================
FAIL: test_mboxmmdf_to_maildir (__main__.TestMessageConversion)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_mailbox.py", line 1580, in test_mboxmmdf_to_maildir
    self.assertEqual(msg.get_date(), 0.0)
AssertionError: 1493984035.955 != 0.0

----------------------------------------------------------------------
Ran 303 tests in 8.456s

FAILED (failures=4, skipped=2)
Traceback (most recent call last):
  File "Lib/test/test_mailbox.py", line 2122, in <module>
    test_main()
  File "Lib/test/test_mailbox.py", line 2117, in test_main
    test_support.run_unittest(*tests)
  File "/data/workspace/linux/Jython/ssh/jython/dist/Lib/test/test_support.py", line 1330, in run_unittest
    _run_suite(suite)
  File "/data/workspace/linux/Jython/ssh/jython/dist/Lib/test/test_support.py", line 1313, in _run_suite
    raise TestFailed(err)
test.test_support.TestFailed: multiple errors occurred


Seeing the file permission related failures it occurred to me that my workspace folder is on an NTFS partition so I can easily access it from Windows. NTFS has less fine grained file permission handling, so I tried the test on an ext4 partition. There it still fails, but yields fewer failures:

======================================================================
FAIL: test_mboxmmdf_to_maildir (__main__.TestMessageConversion)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_mailbox.py", line 1580, in test_mboxmmdf_to_maildir
    self.assertEqual(msg.get_date(), 0.0)
AssertionError: 1493984654.341 != 0.0

----------------------------------------------------------------------
Ran 303 tests in 5.819s

FAILED (failures=1, skipped=2)
Traceback (most recent call last):
  File "Lib/test/test_mailbox.py", line 2122, in <module>
    test_main()
  File "Lib/test/test_mailbox.py", line 2117, in test_main
    test_support.run_unittest(*tests)
  File "/home/stefan/Jython/jython/dist/Lib/test/test_support.py", line 1330, in run_unittest
    _run_suite(suite)
  File "/home/stefan/Jython/jython/dist/Lib/test/test_support.py", line 1313, in _run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_mailbox.py", line 1580, in test_mboxmmdf_to_maildir
    self.assertEqual(msg.get_date(), 0.0)
AssertionError: 1493984654.341 != 0.0


Still - the test shouldn't fail because of running on an NTFS partition. If NTFS inherently yields insufficient permission handling for some tests, these should detect it somehow and be skipped or so.
History
Date User Action Args
2017-05-05 11:52:52stefan.richthofersetrecipients: + stefan.richthofer
2017-05-05 11:52:52stefan.richthofersetmessageid: <1493985172.86.0.0660168173335.issue2586@psf.upfronthosting.co.za>
2017-05-05 11:52:52stefan.richthoferlinkissue2586 messages
2017-05-05 11:52:52stefan.richthofercreate