classification
Title: test_decimal failure on OSX 10.3
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: facundobatista, mark.dickinson, ronaldoussoren
Priority: normal Keywords:

Created on 2008-02-14 16:17 by ronaldoussoren, last changed 2008-02-19 15:30 by ronaldoussoren. This issue is now closed.

Messages (8)
msg62395 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-02-14 16:17
test_decimal fails on Mac OS X 10.3 when using Python 2.5.2c1. I haven't 
tested other python versions. The same test passes on OSX 10.4 and 10.5 
(both on Intel and PPC machines), this was done using the same binaries 
(the Python.org build for 2.5.2c1).

The end of the output of "python test_decimal.py" is:


======================================================================
FAIL: test_normalize (__main__.DecimalTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_decimal.py", line 1351, in <lambda>
    tester = lambda self, f=filename: self.eval_file(directory + f)
  File "test_decimal.py", line 213, in eval_file
    self.fail('Exception "'+exception.__class__.__name__ + '" raised on 
line '+line)
AssertionError: Exception "Clamped" raised on line nrmx218 normalize  
0.001E-999       ->   0         Inexact Rounded Subnormal Underflow

----------------------------------------------------------------------
Ran 189 tests in 35.947s

FAILED (failures=1)
Traceback (most recent call last):
  File "test_decimal.py", line 1376, in <module>
    test_main(arith=True, verbose=True)
  File "test_decimal.py", line 1357, in test_main
    run_unittest(*test_classes)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/test/te
st_support.py", line 451, in run_unittest
    run_suite(suite, testclass)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/test/te
st_support.py", line 436, in run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "test_decimal.py", line 1351, in <lambda>
    tester = lambda self, f=filename: self.eval_file(directory + f)
  File "test_decimal.py", line 213, in eval_file
    self.fail('Exception "'+exception.__class__.__name__ + '" raised on 
line '+line)
AssertionError: Exception "Clamped" raised on line nrmx218 normalize  
0.001E-999       ->   0         Inexact Rounded Subnormal Underflow
msg62399 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-02-14 16:42
It looks like you've got a stale normalize.decTest file in 
Lib/test/decimaltestdata.  This file shouldn't be present.  Can you do a 
fresh svn checkout and see if the problem persists?
msg62402 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-02-14 17:01
I did an upgrade install on the OSX 10.3. Doing a clean install removes 
the problem.

I'm therefore closing this issue as invalid. Sorry about the noise.
msg62404 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-02-14 17:17
Hmm. But others may run into this problem as well.

Is there any way to force the upgrade install to remove this file?
msg62405 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-02-14 17:27
OSX installer is lame. The only way to work around this is to have pre- 
and/or post-install hooks that remove the stdlib (but not site-
packages).

As this only affects the unittests I don't think this is worth the 
problem right now. Especially because I have rather limited time 
available until the 2.5.2 release.
msg62407 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-02-14 17:52
A cheap and easy fix would be to update normalize.decTest so that's it's
an exact copy of reduce.decTest.  This would result in all the
normalization tests being run twice, but that's probably better than
seeing failing tests.

(What happened here is that Mike Cowlishaw fixed some buggy tests in
normalize.decTest and also renamed normalize.decTest to reduce.decTest,
and renamed the tests within the file.)

But I agree that it's not a disaster if this doesn't get fixed.  It's
the tests that are buggy, not the Decimal module.
msg62421 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-02-15 07:06
That's a good idea. I'll try to get this into the installer before 2.5.2 
is actually released.
msg62563 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2008-02-19 15:30
I've applied the workaround in revision 60903 (after testing that it 
actually works).
History
Date User Action Args
2008-02-19 15:30:36ronaldoussorensetmessages: + msg62563
2008-02-15 07:06:44ronaldoussorensetmessages: + msg62421
2008-02-14 17:52:32mark.dickinsonsetmessages: + msg62407
2008-02-14 17:27:00ronaldoussorensetmessages: + msg62405
2008-02-14 17:17:05mark.dickinsonsetmessages: + msg62404
2008-02-14 17:01:28ronaldoussorensetstatus: open -> closed
resolution: not a bug
messages: + msg62402
2008-02-14 16:42:54facundobatistasetnosy: + facundobatista
2008-02-14 16:42:15mark.dickinsonsetnosy: + mark.dickinson
messages: + msg62399
2008-02-14 16:17:27ronaldoussorencreate