summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-06-25 14:57:12 +0200
committerhut <hut@lavabit.com>2010-06-25 14:57:12 +0200
commit40763055c6c1995271acffe6ba5928893940f88b (patch)
treeaa9bf17ca4e1f3cf07005cef68120a74668e109a
parent7bc8b3fc32b44a8db8bfb321423a1bb7718350ab (diff)
downloadranger-40763055c6c1995271acffe6ba5928893940f88b.tar.gz
tc_human_readable: additional testcase (which fails)
-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()
com> 2021-06-24 21:46:45 -0700 .' href='/akkartik/mu/commit/html/linux/312copy.subx.html?h=main&id=ec32c11d3bde6772ddd250d3b217e0541409e0ce'>ec32c11d ^
78357b88 ^
3350c34a ^
dc5a0acf ^

3350c34a ^

78357b88 ^
dc5a0acf ^
78357b88 ^
dc5a0acf ^
78357b88 ^
3350c34a ^



78357b88 ^
3350c34a ^















































































5396e24c ^
3350c34a ^





















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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129