diff options
Diffstat (limited to 'tests/python/corelib/numerics/CommodityAmount.py')
-rw-r--r-- | tests/python/corelib/numerics/CommodityAmount.py | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/tests/python/corelib/numerics/CommodityAmount.py b/tests/python/corelib/numerics/CommodityAmount.py index 417652e4..e29d091a 100644 --- a/tests/python/corelib/numerics/CommodityAmount.py +++ b/tests/python/corelib/numerics/CommodityAmount.py @@ -90,9 +90,9 @@ class CommodityAmountTestCase(unittest.TestCase): self.assertEqual(amount("-123.45€"), - x9) self.assertEqual(amount("123.45€"), - x10) - self.assertEqual(amount("$-123.45"), x1.negated()) - self.assertEqual(amount("$123.45"), x2.negated()) - self.assertEqual(amount("$123.45"), x3.negated()) + self.assertEqual(amount("$-123.45"), x1.negate()) + self.assertEqual(amount("$123.45"), x2.negate()) + self.assertEqual(amount("$123.45"), x3.negate()) self.assertEqual("$-123.45", (- x1).to_string()) self.assertEqual("$123.45", (- x2).to_string()) @@ -105,13 +105,9 @@ class CommodityAmountTestCase(unittest.TestCase): self.assertEqual("-123.45€", (- x9).to_string()) self.assertEqual("123.45€", (- x10).to_string()) - x1.negate() - x2.negate() - x3.negate() - - self.assertEqual(amount("$-123.45"), x1) - self.assertEqual(amount("$123.45"), x2) - self.assertEqual(amount("$123.45"), x3) + self.assertEqual(amount("$-123.45"), x1.negate()) + self.assertEqual(amount("$123.45"), x2.negate()) + self.assertEqual(amount("$123.45"), x3.negate()) self.assertValid(x1) self.assertValid(x2) @@ -613,14 +609,6 @@ class CommodityAmountTestCase(unittest.TestCase): self.assertEqual(amount("$1234.56"), abs(x1)) self.assertEqual(amount("$1234.56"), abs(x2)) - x0.abs() - x1.abs() - x2.abs() - - self.assertEqual(amount(), x0) - self.assertEqual(amount("$1234.56"), x1) - self.assertEqual(amount("$1234.56"), x2) - self.assertValid(x0) self.assertValid(x1) self.assertValid(x2) |