diff options
author | John Wiegley <johnw@newartisans.com> | 2007-04-23 04:42:44 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:30 -0400 |
commit | 6853db57e6fdb6fd95764be1f35af0006c9e2ef9 (patch) | |
tree | bf24550cbc6053c51bf2f3fdcf27f39a4c989f24 /tests/python | |
parent | be9f18ccfe81acdd2f34b27352f2843235fab69b (diff) | |
download | fork-ledger-6853db57e6fdb6fd95764be1f35af0006c9e2ef9.tar.gz fork-ledger-6853db57e6fdb6fd95764be1f35af0006c9e2ef9.tar.bz2 fork-ledger-6853db57e6fdb6fd95764be1f35af0006c9e2ef9.zip |
All tests now working again. Reduced size of entity_t and
transaction_t considerably.
Diffstat (limited to 'tests/python')
-rw-r--r-- | tests/python/corelib/numerics/BasicAmount.py | 6 | ||||
-rw-r--r-- | tests/python/corelib/numerics/CommodityAmount.py | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/python/corelib/numerics/BasicAmount.py b/tests/python/corelib/numerics/BasicAmount.py index 2ce532d9..bfb67cf2 100644 --- a/tests/python/corelib/numerics/BasicAmount.py +++ b/tests/python/corelib/numerics/BasicAmount.py @@ -4,6 +4,12 @@ import exceptions from ledger import amount class BasicAmountTestCase(unittest.TestCase): + def setUp(self): + amount.initialize() + + def tearDown(self): + amount.shutdown() + def testConstructors(self): x0 = amount() x1 = amount(123456) diff --git a/tests/python/corelib/numerics/CommodityAmount.py b/tests/python/corelib/numerics/CommodityAmount.py index e29d091a..923fab69 100644 --- a/tests/python/corelib/numerics/CommodityAmount.py +++ b/tests/python/corelib/numerics/CommodityAmount.py @@ -8,16 +8,18 @@ from ledger import amount internalAmount = amount.exact - class CommodityAmountTestCase(unittest.TestCase): def setUp(self): + amount.initialize() + # Cause the display precision for dollars to be initialized to 2. x1 = amount("$1.00") self.assertTrue(x1) amount.full_strings = True # makes error reports from UnitTests accurate - + def tearDown(self): amount.full_strings = False + amount.shutdown() def assertValid(self, amt): self.assertTrue(amt.valid()) |