summaryrefslogtreecommitdiff
path: root/tests/python/corelib/numerics/BasicAmount.py
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-19 20:31:46 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:28 -0400
commit0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c (patch)
tree0a2c2aca7100d045f491b03f0a5bda92378d3ef9 /tests/python/corelib/numerics/BasicAmount.py
parent176b3044e355398a0c31e0c42a3cd7b8a2e3f3e5 (diff)
downloadfork-ledger-0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c.tar.gz
fork-ledger-0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c.tar.bz2
fork-ledger-0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c.zip
Made the amount/balance/value interface a bit more rational; added
back a useless version of the register command (just to prove the command sequence); and added smart XML semantics to the XPath implementation so that nodes can be coerced to values.
Diffstat (limited to 'tests/python/corelib/numerics/BasicAmount.py')
-rw-r--r--tests/python/corelib/numerics/BasicAmount.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/tests/python/corelib/numerics/BasicAmount.py b/tests/python/corelib/numerics/BasicAmount.py
index df522f09..2ce532d9 100644
--- a/tests/python/corelib/numerics/BasicAmount.py
+++ b/tests/python/corelib/numerics/BasicAmount.py
@@ -42,10 +42,9 @@ class BasicAmountTestCase(unittest.TestCase):
self.assertEqual(x5, x1)
self.assertEqual(x6, x3)
self.assertEqual(- x6, x9)
- self.assertEqual(x3.negated(), x9)
+ self.assertEqual(x3.negate(), x9)
- x10 = amount(x9)
- x10.negate()
+ x10 = amount(x9.negate())
self.assertEqual(x3, x10)
@@ -509,14 +508,6 @@ class BasicAmountTestCase(unittest.TestCase):
self.assertEqual(amount(1234), abs(x1))
self.assertEqual(amount(1234), abs(x2))
- x0.abs()
- x1.abs()
- x2.abs()
-
- self.assertEqual(amount(), x0)
- self.assertEqual(amount(1234), x1)
- self.assertEqual(amount(1234), x2)
-
self.assertTrue(x0.valid())
self.assertTrue(x1.valid())
self.assertTrue(x2.valid())