[Python-bugs-list] [ python-Bugs-460357 ] test_time fails on Sparc64

noreply@sourceforge.net noreply@sourceforge.net
Tue, 16 Apr 2002 02:16:55 -0700


Bugs item #460357, was opened at 2001-09-10 17:58
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=460357&group_id=5470

Category: Extension Modules
Group: Python 2.2.1 candidate
Status: Open
Resolution: None
Priority: 7
Submitted By: Martin v. Löwis (loewis)
Assigned to: Barry Warsaw (bwarsaw)
Summary: test_time fails on Sparc64

Initial Comment:
On Solaris8, with the WS6U1 compiler, after setting CC
to 'cc -xarch=v9', test_time.py fails with

  File "Lib/test/test_time.py", line 46, in test_mktime
    time.mktime, (999999, 999999, 999999, 999999,
  File
"/vol/marvin-vol8/loewis/python/dist/src/Lib/unittest.py",
line 273, in failUnlessRaises
    raise self.failureException, excName
AssertionError: OverflowError

The problem is that the test doesn't overflow. Instead,
it gives the value 34214554704339.0.

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

>Comment By: Martin v. Löwis (loewis)
Date: 2002-04-16 11:16

Message:
Logged In: YES 
user_id=21627

Removing the test sounds good to me; feel free to close this
report afterwards.

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

Comment By: Barry Warsaw (bwarsaw)
Date: 2002-04-15 22:12

Message:
Logged In: YES 
user_id=12800

I'm inclined to remove the whole test.  Certainly testing
for OverflowError isn't useful (and if I ever thought it
was, I can't remember why), so about the only useful thing I
can think to test would be that a localtime() to mktime()
roundtrip is idempotent.

If we really wanted to test for OverflowError (or ValueError
as the docs specify /could/ occur instead), then would using
(sys.maxint,)*9 be better?  That still seems icky to me.

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

Comment By: Tim Peters (tim_one)
Date: 2002-04-03 21:27

Message:
Logged In: YES 
user_id=31435

Raised priority and changed Group to 2.2.1 candidate.  We 
can't assume that time_t is too feeble to represent the 
date being tested, and Barry should rework the test so that 
it doesn't fail on 64-bit boxes (I recall that he wanted to 
test *something* here for Mailman's purposes, so it's up to 
him to figure out what he really wants -- testing that the 
platform has a feeble time_t ain't it).

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

Comment By: Martin v. Löwis (loewis)
Date: 2002-04-03 11:39

Message:
Logged In: YES 
user_id=21627

Assigned to Barry, since Tim assigned #538369 to Barry.

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

Comment By: Martin v. Löwis (loewis)
Date: 2002-04-03 11:34

Message:
Logged In: YES 
user_id=21627

This was reported for alpha as well, as #538369.

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

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