mark.dickinson
2008-08-21 20:05:57 UTC
Author: mark.dickinson
Date: Thu Aug 21 22:05:56 2008
New Revision: 65959
Log:
Merged revisions 65958 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk
........
r65958 | mark.dickinson | 2008-08-21 21:02:24 +0100 (Thu, 21 Aug 2008) | 5 lines
Fix float.fromhex test to give additional information on failure. This
change is aimed at diagnosing issue 3633 (test_float fails on Solaris).
Reviewed by Benjamin Peterson
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_float.py
Modified: python/branches/py3k/Lib/test/test_float.py
==============================================================================
--- python/branches/py3k/Lib/test/test_float.py (original)
+++ python/branches/py3k/Lib/test/test_float.py Thu Aug 21 22:05:56 2008
@@ -448,7 +448,13 @@
'0x1p0\0 0x1p0', # embedded null byte is not end of string
]
for x in invalid_inputs:
- self.assertRaises(ValueError, fromHex, x)
+ try:
+ result = fromHex(x)
+ except ValueError:
+ pass
+ else:
+ self.fail('Expected float.fromhex(%r) to raise ValueError; '
+ 'got %r instead' % (x, result))
def test_from_hex(self):
Date: Thu Aug 21 22:05:56 2008
New Revision: 65959
Log:
Merged revisions 65958 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk
........
r65958 | mark.dickinson | 2008-08-21 21:02:24 +0100 (Thu, 21 Aug 2008) | 5 lines
Fix float.fromhex test to give additional information on failure. This
change is aimed at diagnosing issue 3633 (test_float fails on Solaris).
Reviewed by Benjamin Peterson
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_float.py
Modified: python/branches/py3k/Lib/test/test_float.py
==============================================================================
--- python/branches/py3k/Lib/test/test_float.py (original)
+++ python/branches/py3k/Lib/test/test_float.py Thu Aug 21 22:05:56 2008
@@ -448,7 +448,13 @@
'0x1p0\0 0x1p0', # embedded null byte is not end of string
]
for x in invalid_inputs:
- self.assertRaises(ValueError, fromHex, x)
+ try:
+ result = fromHex(x)
+ except ValueError:
+ pass
+ else:
+ self.fail('Expected float.fromhex(%r) to raise ValueError; '
+ 'got %r instead' % (x, result))
def test_from_hex(self):