diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-07 10:27:21 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:39 -0400 |
commit | d8498372037a4d0c272547ae48046b2182bcd4b1 (patch) | |
tree | ea3f228c5b6b20d71456e47a418e383669925d5f /tests/python/numerics/CommodityAmount.py | |
parent | a71d48881e538630aa1d147d58365da84e6db91f (diff) | |
download | fork-ledger-d8498372037a4d0c272547ae48046b2182bcd4b1.tar.gz fork-ledger-d8498372037a4d0c272547ae48046b2182bcd4b1.tar.bz2 fork-ledger-d8498372037a4d0c272547ae48046b2182bcd4b1.zip |
Major restructuring of the value_t class.
Diffstat (limited to 'tests/python/numerics/CommodityAmount.py')
-rw-r--r-- | tests/python/numerics/CommodityAmount.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/python/numerics/CommodityAmount.py b/tests/python/numerics/CommodityAmount.py index 0edd9fad..3b7c98a9 100644 --- a/tests/python/numerics/CommodityAmount.py +++ b/tests/python/numerics/CommodityAmount.py @@ -449,7 +449,8 @@ class CommodityAmountTestCase(unittest.TestCase): x1 = amount("$1234.56") self.assertEqual(True, bool(x1)) - self.assertEqual(1234, int(x1)) + self.assertRaises(exceptions.ArithmeticError, amount.to_long, x1) + self.assertEqual(1234, x1.to_long(True)) self.assertEqual(1234.56, float(x1)) self.assertEqual("$1234.56", x1.to_string()) self.assertEqual("1234.56", x1.quantity_string()) |