[Python-bugs-list] [ python-Bugs-586905 ] test_imaplib broken on Mac

noreply@sourceforge.net noreply@sourceforge.net
Sat, 03 Aug 2002 04:22:26 -0700


Bugs item #586905, was opened at 2002-07-26 19:37
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=586905&group_id=5470

Category: Macintosh
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jack Jansen (jackjansen)
Assigned to: Piers Lauder (pierslauder)
Summary: test_imaplib broken on Mac

Initial Comment:
Test_imaplib recently broke on the Macintosh (or, to be more specific, for MacPython).

The reason seems to be that the test has been modified to check that all 5 test dates (3 in 1967, 2 in 2033) return the same value after a round trip. For MacPython this is true for the 3 1967 values but not for the 2033 values: these are both the same value, but in 2033, which is also what i would expect, really.

Is the 1967/2033 match testing for something that is really part of the imap spec? Or could it be that it is testing a artefact of the Unix implementation of time values (which apparently doesn't occur when using the Metrowerks runtime on MacOS, which has a wholly different representation of time), and that we really shouldn't be testing this? Or testing it and only matching it against itself (i.e. the 2033 time value)?

----------------------------------------------------------------------

>Comment By: Piers Lauder (pierslauder)
Date: 2002-08-03 21:22

Message:
Logged In: YES 
user_id=196212

version 1.2 of test_imaplib.py worked, so should fix this
problem.

(The later versions were an attempt to increase the number
of functions tested, but clearly didn't solve the time-zone
problem. Version 1.2 just tests that there is no exception
for one function, and doesn't attempt to check the output.)

----------------------------------------------------------------------

Comment By: Piers Lauder (pierslauder)
Date: 2002-08-03 21:16

Message:
Logged In: YES 
user_id=196212

I've reverted test_imaplib.py to version 1.2 which as far as
I know is known to work everywhere.


----------------------------------------------------------------------

Comment By: Piers Lauder (pierslauder)
Date: 2002-07-27 10:41

Message:
Logged In: YES 
user_id=196212

All 5 dates are supposed to be the same time (Wed May 18 03:33:20 2033 GMT)
The first three are numbers, the second two are IMAP4 INTERNALDATE representations of that time in different 
timezones.

But of course time.time() values are O/S dpendant, so those numbers will only work on O/Ss with 1/1/1970 as the 
epoch..

I've removed the numbers from the test. Please try the new test, it should now be O/S agnostic.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=586905&group_id=5470