summary refs log tree commit diff stats
path: root/test/tc_human_readable.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/tc_human_readable.py')
-rw-r--r--test/tc_human_readable.py4
1 files changed, 4 insertions, 0 deletions
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()
^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64