[Python-checkins] r86519 - python/branches/py3k-cdecimal/Lib/test/decimal_tests.py

stefan.krah python-checkins at python.org
Thu Nov 18 16:35:36 CET 2010


Author: stefan.krah
Date: Thu Nov 18 16:35:36 2010
New Revision: 86519

Log:
decimal.py now raises ValueError, too.

Modified:
   python/branches/py3k-cdecimal/Lib/test/decimal_tests.py

Modified: python/branches/py3k-cdecimal/Lib/test/decimal_tests.py
==============================================================================
--- python/branches/py3k-cdecimal/Lib/test/decimal_tests.py	(original)
+++ python/branches/py3k-cdecimal/Lib/test/decimal_tests.py	Thu Nov 18 16:35:36 2010
@@ -1671,8 +1671,7 @@
 
         #the same hash that to an int
         self.assertEqual(hashit(Decimal(23)), hashit(23))
-        ex = ValueError if HAVE_CDECIMAL else TypeError
-        self.assertRaises(ex, hash, Decimal('sNaN'))
+        self.assertRaises(ValueError, hash, Decimal('sNaN'))
         self.assertTrue(hashit(Decimal('Inf')))
         self.assertTrue(hashit(Decimal('-Inf')))
 


More information about the Python-checkins mailing list