#33 Tests fail under Python 2.7

closed-fixed
nobody
None
5
2011-06-22
2011-06-09
No

Noticed this due to an Ubuntu build failure:
https://launchpadlibrarian.net/70811701/buildlog_ubuntu-oneiric-i386.archivemail_0.8.2-1_FAILEDTOBUILD.txt.gz

Fails with current GIT head too
$ git log -1
commit 39e6a532d0654440679fb5980352615a004f090c
...

$ ./test_archivemail
....................................................EE.E...E...................................
======================================================================
ERROR: testMixed (__main__.TestMaildir)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_archivemail", line 1432, in testMixed
self.verify()
File "./test_archivemail", line 1275, in verify
self._verify_archive()
File "./test_archivemail", line 1337, in _verify_archive
for msg in mb:
File "/usr/lib/python2.7/mailbox.py", line 1998, in next
self._search_start()
File "/usr/lib/python2.7/mailbox.py", line 2019, in _search_start
self.fp.seek(pos)
File "./test_archivemail", line 95, in seek
gzip.GzipFile.seek(self, offset)
File "/usr/lib/python2.7/gzip.py", line 423, in seek
count = offset - self.offset
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

======================================================================
ERROR: testMixedExisting (__main__.TestMaildir)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_archivemail", line 1437, in testMixedExisting
self.verify()
File "./test_archivemail", line 1275, in verify
self._verify_archive()
File "./test_archivemail", line 1337, in _verify_archive
for msg in mb:
File "/usr/lib/python2.7/mailbox.py", line 1998, in next
self._search_start()
File "/usr/lib/python2.7/mailbox.py", line 2019, in _search_start
self.fp.seek(pos)
File "./test_archivemail", line 95, in seek
gzip.GzipFile.seek(self, offset)
File "/usr/lib/python2.7/gzip.py", line 423, in seek
count = offset - self.offset
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

======================================================================
ERROR: testOld (__main__.TestMaildir)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_archivemail", line 1422, in testOld
self.verify()
File "./test_archivemail", line 1275, in verify
self._verify_archive()
File "./test_archivemail", line 1337, in _verify_archive
for msg in mb:
File "/usr/lib/python2.7/mailbox.py", line 1998, in next
self._search_start()
File "/usr/lib/python2.7/mailbox.py", line 2019, in _search_start
self.fp.seek(pos)
File "./test_archivemail", line 95, in seek
gzip.GzipFile.seek(self, offset)
File "/usr/lib/python2.7/gzip.py", line 423, in seek
count = offset - self.offset
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

======================================================================
ERROR: testOld (__main__.TestMaildirCopy)
archiving an old maildir mailbox with the 'copy' option
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_archivemail", line 1549, in testOld
self.verify()
File "./test_archivemail", line 1275, in verify
self._verify_archive()
File "./test_archivemail", line 1337, in _verify_archive
for msg in mb:
File "/usr/lib/python2.7/mailbox.py", line 1998, in next
self._search_start()
File "/usr/lib/python2.7/mailbox.py", line 2019, in _search_start
self.fp.seek(pos)
File "./test_archivemail", line 95, in seek
gzip.GzipFile.seek(self, offset)
File "/usr/lib/python2.7/gzip.py", line 423, in seek
count = offset - self.offset
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

----------------------------------------------------------------------
Ran 95 tests in 2.165s

FAILED (errors=4)

Discussion

  • Nikolaus Schulz

    Nikolaus Schulz - 2011-06-22
    • status: open --> closed-fixed
     
  • Nikolaus Schulz

    Nikolaus Schulz - 2011-06-22

    This is now fixed in git.

    Actually, I think this was caused by a bug in the python library; at least it is an incompatible change in python 2.7. See commit f6046b9 in the archivemail git repo for details.

    Thanks for reporting.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks