From 40763055c6c1995271acffe6ba5928893940f88b Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 25 Jun 2010 14:57:12 +0200 Subject: tc_human_readable: additional testcase (which fails) --- test/tc_human_readable.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/tc_human_readable.py b/test/tc_human_readable.py index 50fc80a1..b931ba21 100644 --- a/test/tc_human_readable.py +++ b/test/tc_human_readable.py @@ -37,5 +37,9 @@ class HumanReadableTest(unittest.TestCase): self.assertEqual("1.5 K", hr(2 ** 10 + 2 ** 9)) self.assertEqual("1.5 K", hr(2 ** 10 + 2 ** 9 - 1)) + def test_no_exponent(self): + for i in range(2 ** 10, 2 ** 20, 512): + self.assertTrue('e' not in hr(i), "%d => %s" % (i, hr(i))) + if __name__ == '__main__': unittest.main() -- cgit 1.4.1-2-gfad0