summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_decimal.py
diff options
context:
space:
mode:
authorStefan Krah <stefan@bytereef.org>2010-11-18 15:20:34 (GMT)
committerStefan Krah <stefan@bytereef.org>2010-11-18 15:20:34 (GMT)
commitd8b661dd908629b5fc0f50e3e0c5fc5c85f9cb72 (patch)
treed0ef7aecae02539954c2a7a0411a4063d473cd2c /Lib/test/test_decimal.py
parentd28f790b69190192f7f8412f182b57c5894fade6 (diff)
downloadcpython-d8b661dd908629b5fc0f50e3e0c5fc5c85f9cb72.zip
cpython-d8b661dd908629b5fc0f50e3e0c5fc5c85f9cb72.tar.gz
cpython-d8b661dd908629b5fc0f50e3e0c5fc5c85f9cb72.tar.bz2
Issue #10356: hash(Decimal("sNaN")) now raises ValueError instead of TypeError.
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r--Lib/test/test_decimal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 611ef55..b07fb1d 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -1346,7 +1346,7 @@ class DecimalUsabilityTest(unittest.TestCase):
#the same hash that to an int
self.assertEqual(hashit(Decimal(23)), hashit(23))
- self.assertRaises(TypeError, hash, Decimal('sNaN'))
+ self.assertRaises(ValueError, hash, Decimal('sNaN'))
self.assertTrue(hashit(Decimal('Inf')))
self.assertTrue(hashit(Decimal('-Inf')))