mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merged revisions 79502 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79502 | antoine.pitrou | 2010-03-30 20:49:45 +0200 (mar., 30 mars 2010) | 4 lines Issue #8248: Add some tests for the bool type. Patch by Gregory Nofi. ........
This commit is contained in:
parent
25cd7eb9a1
commit
503ab33e54
5 changed files with 23 additions and 0 deletions
|
@ -472,6 +472,12 @@ class DecimalExplicitConstructionTest(unittest.TestCase):
|
|||
self.assertRaises(ValueError, Decimal, (1, (4, 10, 4, 9, 1), 2) )
|
||||
self.assertRaises(ValueError, Decimal, (1, (4, 3, 4, 'a', 1), 2) )
|
||||
|
||||
def test_explicit_from_bool(self):
|
||||
self.assertIs(bool(Decimal(0)), False)
|
||||
self.assertIs(bool(Decimal(1)), True)
|
||||
self.assertEqual(Decimal(False), Decimal(0))
|
||||
self.assertEqual(Decimal(True), Decimal(1))
|
||||
|
||||
def test_explicit_from_Decimal(self):
|
||||
|
||||
#positive
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue