Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_decimal failure on OSX 10.3 #46368

Closed
ronaldoussoren opened this issue Feb 14, 2008 · 8 comments
Closed

test_decimal failure on OSX 10.3 #46368

ronaldoussoren opened this issue Feb 14, 2008 · 8 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@ronaldoussoren
Copy link
Contributor

BPO 2114
Nosy @facundobatista, @ronaldoussoren, @mdickinson

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2008-02-14.17:01:28.337>
created_at = <Date 2008-02-14.16:17:27.318>
labels = ['invalid', 'type-bug', 'library']
title = 'test_decimal failure on OSX 10.3'
updated_at = <Date 2008-02-19.15:30:36.879>
user = 'https://github.com/ronaldoussoren'

bugs.python.org fields:

activity = <Date 2008-02-19.15:30:36.879>
actor = 'ronaldoussoren'
assignee = 'none'
closed = True
closed_date = <Date 2008-02-14.17:01:28.337>
closer = 'ronaldoussoren'
components = ['Library (Lib)']
creation = <Date 2008-02-14.16:17:27.318>
creator = 'ronaldoussoren'
dependencies = []
files = []
hgrepos = []
issue_num = 2114
keywords = []
message_count = 8.0
messages = ['62395', '62399', '62402', '62404', '62405', '62407', '62421', '62563']
nosy_count = 3.0
nosy_names = ['facundobatista', 'ronaldoussoren', 'mark.dickinson']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue2114'
versions = ['Python 2.5']

@ronaldoussoren
Copy link
Contributor Author

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

@ronaldoussoren ronaldoussoren added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Feb 14, 2008
@mdickinson
Copy link
Member

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?

@ronaldoussoren
Copy link
Contributor Author

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.

@mdickinson
Copy link
Member

Hmm. But others may run into this problem as well.

Is there any way to force the upgrade install to remove this file?

@ronaldoussoren
Copy link
Contributor Author

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.

@mdickinson
Copy link
Member

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.

@ronaldoussoren
Copy link
Contributor Author

That's a good idea. I'll try to get this into the installer before 2.5.2
is actually released.

@ronaldoussoren
Copy link
Contributor Author

I've applied the workaround in revision 60903 (after testing that it
actually works).

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants