tests/testprettysize.py
changeset 50 f71d3abbb18f
parent 49 08e4dfe1b0cb
child 51 bdc44f96cb0b
--- a/tests/testprettysize.py	Sat Sep 29 13:53:54 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-#!/usr/bin/env python3
-
-import unittest
-from pgtoolkit import prettysize
-
-class TestHumansize(unittest.TestCase):
-    def test_humansize(self):
-        psize = prettysize.prettysize_short
-        expected = (
-            (0, '0'),
-            (1000, '1000'),
-            (1024, '1K'),
-            (1050, '1.03K'),
-            (2050, '2K'),
-            (333333, '325.52K'),
-            (1048576, '1M'),
-            (1050000, '1M'),
-            (5555555, '5.3M'),
-            (1073741824, '1G'),
-            )
-        for input, result in expected:
-            self.assertEqual(psize(input), result)
-
-
-if __name__ == '__main__':
-    unittest.main()