projects
/
pyutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More work to improve documentation generated by sphinx. Also fixes
[pyutils.git]
/
tests
/
typez
/
centcount_test.py
diff --git
a/tests/typez/centcount_test.py
b/tests/typez/centcount_test.py
index 5ba60b147895ab9ed3aa0ba354177cc7c11792d4..2bb6d3e8e3b21b6cdb02d985ae74db35dc231547 100755
(executable)
--- a/
tests/typez/centcount_test.py
+++ b/
tests/typez/centcount_test.py
@@
-51,6
+51,8
@@
class TestCentCount(unittest.TestCase):
amount = CentCount(10.00)
x = amount / 5.0
self.assertEqual(CentCount(2.00), x)
amount = CentCount(10.00)
x = amount / 5.0
self.assertEqual(CentCount(2.00), x)
+ y = amount / 1.9999999999
+ self.assertEqual(CentCount(5.00), y)
with self.assertRaises(TypeError):
another = CentCount(1.33)
amount /= another
with self.assertRaises(TypeError):
another = CentCount(1.33)
amount /= another
@@
-94,12
+96,6
@@
class TestCentCount(unittest.TestCase):
print(two > 1.0)
self.assertTrue(two > one)
print(two > 1.0)
self.assertTrue(two > one)
- def test_truncate_and_round(self):
- ten = CentCount(10.0)
- x = ten * 2 / 3
- x.truncate_fractional_cents()
- self.assertEqual(CentCount(6.66), x)
-
if __name__ == '__main__':
unittest.main()
if __name__ == '__main__':
unittest.main()