New submission from Stefan Krah <stefan-use...@bytereef.org>:

As discussed privately, the following test cases should raise TypeError
(currently ValueError):

self.assertRaises(TypeError, Decimal, (0., (4, 3, 4, 9, 1), 2) )
self.assertRaises(TypeError, Decimal, (Decimal(1), (4, 3, 4, 9, 1), 2))
self.assertRaises(TypeError, Decimal, (1, (4, 3, 4, 9, 1), 0.) )
self.assertRaises(TypeError, Decimal, (1, (4, 3, 4, None, 1), 2) )
self.assertRaises(TypeError, Decimal, (1, (4, 3, 4, 'a', 1), 2) )

----------
messages: 98564
nosy: mark.dickinson, skrah
severity: normal
status: open
title: [decimal] ValueError -> TypeError in from_tuple

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7811>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to