summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-07 10:25:25 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:39 -0400
commitc211335760f2c5883aed34c31aeb6ce7e8e51bf9 (patch)
treea8b6f4fcfb971ef2eee06bce22e1aab25d9ad4ef /tests
parenta07e20c14e5ba3597a855276ad9a195343aee42f (diff)
downloadfork-ledger-c211335760f2c5883aed34c31aeb6ce7e8e51bf9.tar.gz
fork-ledger-c211335760f2c5883aed34c31aeb6ce7e8e51bf9.tar.bz2
fork-ledger-c211335760f2c5883aed34c31aeb6ce7e8e51bf9.zip
Extended Python amount class.
Diffstat (limited to 'tests')
-rw-r--r--tests/python/numerics/BasicAmount.py8
-rw-r--r--tests/python/numerics/CommodityAmount.py8
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/python/numerics/BasicAmount.py b/tests/python/numerics/BasicAmount.py
index 4dfb3a7a..9e2c1b3e 100644
--- a/tests/python/numerics/BasicAmount.py
+++ b/tests/python/numerics/BasicAmount.py
@@ -444,10 +444,10 @@ class BasicAmountTestCase(unittest.TestCase):
self.assertFalse(x0)
self.assertTrue(x1)
- self.assertTrue(x0.zero())
- self.assertTrue(x0.realzero())
- self.assertFalse(x1.zero())
- self.assertFalse(x1.realzero())
+ self.assertTrue(x0.is_zero())
+ self.assertTrue(x0.is_realzero())
+ self.assertFalse(x1.is_zero())
+ self.assertFalse(x1.is_realzero())
self.assertTrue(x0.valid())
self.assertTrue(x1.valid())
diff --git a/tests/python/numerics/CommodityAmount.py b/tests/python/numerics/CommodityAmount.py
index 5c177044..0edd9fad 100644
--- a/tests/python/numerics/CommodityAmount.py
+++ b/tests/python/numerics/CommodityAmount.py
@@ -178,8 +178,8 @@ class CommodityAmountTestCase(unittest.TestCase):
x10 = amount("-123.45€")
self.assertTrue(x0.is_null())
- self.assertTrue(x0.zero())
- self.assertTrue(x0.realzero())
+ self.assertTrue(x0.is_zero())
+ self.assertTrue(x0.is_realzero())
self.assertTrue(x0.sign() == 0)
self.assertTrue(x0.compare(x1) < 0)
self.assertTrue(x0.compare(x2) > 0)
@@ -543,8 +543,8 @@ class CommodityAmountTestCase(unittest.TestCase):
x1 = amount(internalAmount("$0.000000000000000000001"))
self.assertFalse(x1)
- self.assertTrue(x1.zero())
- self.assertFalse(x1.realzero())
+ self.assertTrue(x1.is_zero())
+ self.assertFalse(x1.is_realzero())
self.assertValid(x1)