Home | History | Annotate | Download | only in test

Lines Matching refs:testboth

49 def testboth(formatstr, *args, **kwargs):
57 testboth("%.1d", (1,), "1")
58 testboth("%.*d", (sys.maxint,1), overflowok=True) # expect overflow
59 testboth("%.100d", (1,), '00000000000000000000000000000000000000'
62 testboth("%#.117x", (1,), '0x00000000000000000000000000000000000'
66 testboth("%#.118x", (1,), '0x00000000000000000000000000000000000'
71 testboth("%f", (1.0,), "1.000000")
75 testboth("%#.*g", (109, -1.e+49/3.))
76 testboth("%#.*g", (110, -1.e+49/3.))
77 testboth("%#.*g", (110, -1.e+100/3.))
80 testboth('%12.*f', (123456, 1.0))
85 testboth("%#.*g", (110, -1.e+100/3.))
86 testboth("%#.*G", (110, -1.e+100/3.))
87 testboth("%#.*f", (110, -1.e+100/3.))
88 testboth("%#.*F", (110, -1.e+100/3.))
91 testboth("%x", 10L, "a")
92 testboth("%x", 100000000000L, "174876e800")
93 testboth("%o", 10L, "12")
94 testboth("%o", 100000000000L, "1351035564000")
95 testboth("%d", 10L, "10")
96 testboth("%d", 100000000000L, "100000000000")
99 testboth("%d", big, "123456789012345678901234567890")
100 testboth("%d", -big, "-123456789012345678901234567890")
101 testboth("%5d", -big, "-123456789012345678901234567890")
102 testboth("%31d", -big, "-123456789012345678901234567890")
103 testboth("%32d", -big, " -123456789012345678901234567890")
104 testboth("%-32d", -big, "-123456789012345678901234567890 ")
105 testboth("%032d", -big, "-0123456789012345678901234567890")
106 testboth("%-032d", -big, "-123456789012345678901234567890 ")
107 testboth("%034d", -big, "-000123456789012345678901234567890")
108 testboth("%034d", big, "0000123456789012345678901234567890")
109 testboth("%0+34d", big, "+000123456789012345678901234567890")
110 testboth("%+34d", big, " +123456789012345678901234567890")
111 testboth("%34d", big, " 123456789012345678901234567890")
112 testboth("%.2d", big, "123456789012345678901234567890")
113 testboth("%.30d", big, "123456789012345678901234567890")
114 testboth("%.31d", big, "0123456789012345678901234567890")
115 testboth("%32.31d", big, " 0123456789012345678901234567890")
116 testboth("%d", float(big), "123456________________________", 6)
119 testboth("%x", big, "1234567890abcdef12345")
120 testboth("%x", -big, "-1234567890abcdef12345")
121 testboth("%5x", -big, "-1234567890abcdef12345")
122 testboth("%22x", -big, "-1234567890abcdef12345")
123 testboth("%23x", -big, " -1234567890abcdef12345")
124 testboth("%-23x", -big, "-1234567890abcdef12345 ")
125 testboth("%023x", -big, "-01234567890abcdef12345")
126 testboth("%-023x", -big, "-1234567890abcdef12345 ")
127 testboth("%025x", -big, "-0001234567890abcdef12345")
128 testboth("%025x", big, "00001234567890abcdef12345")
129 testboth("%0+25x", big, "+0001234567890abcdef12345")
130 testboth("%+25x", big, " +1234567890abcdef12345")
131 testboth("%25x", big, " 1234567890abcdef12345")
132 testboth("%.2x", big, "1234567890abcdef12345")
133 testboth("%.21x", big, "1234567890abcdef12345")
134 testboth("%.22x", big, "01234567890abcdef12345")
135 testboth("%23.22x", big, " 01234567890abcdef12345")
136 testboth("%-23.22x", big, "01234567890abcdef12345 ")
137 testboth("%X", big, "1234567890ABCDEF12345")
138 testboth("%#X", big, "0X1234567890ABCDEF12345")
139 testboth("%#x", big, "0x1234567890abcdef12345")
140 testboth("%#x", -big, "-0x1234567890abcdef12345")
141 testboth("%#.23x", -big, "-0x001234567890abcdef12345")
142 testboth("%#+.23x", big, "+0x001234567890abcdef12345")
143 testboth("%# .23x", big, " 0x001234567890abcdef12345")
144 testboth("%#+.23X", big, "+0X001234567890ABCDEF12345")
145 testboth("%#-+.23X", big, "+0X001234567890ABCDEF12345")
146 testboth("%#-+26.23X", big, "+0X001234567890ABCDEF12345")
147 testboth("%#-+27.23X", big, "+0X001234567890ABCDEF12345 ")
148 testboth("%#+27.23X", big, " +0X001234567890ABCDEF12345")
151 testboth("%#+027.23X", big, "+0X0001234567890ABCDEF12345")
153 testboth("%#+27.23X", big, " +0X001234567890ABCDEF12345")
154 testboth("%x", float(big), "123456_______________", 6)
157 testboth("%o", big, "12345670123456701234567012345670")
158 testboth("%o", -big, "-12345670123456701234567012345670")
159 testboth("%5o", -big, "-12345670123456701234567012345670")
160 testboth("%33o", -big, "-12345670123456701234567012345670")
161 testboth("%34o", -big, " -12345670123456701234567012345670")
162 testboth("%-34o", -big, "-12345670123456701234567012345670 ")
163 testboth("%034o", -big, "-012345670123456701234567012345670")
164 testboth("%-034o", -big, "-12345670123456701234567012345670 ")
165 testboth("%036o", -big, "-00012345670123456701234567012345670")
166 testboth("%036o", big, "000012345670123456701234567012345670")
167 testboth("%0+36o", big, "+00012345670123456701234567012345670")
168 testboth("%+36o", big, " +12345670123456701234567012345670")
169 testboth("%36o", big, " 12345670123456701234567012345670")
170 testboth("%.2o", big, "12345670123456701234567012345670")
171 testboth("%.32o", big, "12345670123456701234567012345670")
172 testboth("%.33o", big, "012345670123456701234567012345670")
173 testboth("%34.33o", big, " 012345670123456701234567012345670")
174 testboth("%-34.33o", big, "012345670123456701234567012345670 ")
175 testboth("%o", big, "12345670123456701234567012345670")
176 testboth("%#o", big, "012345670123456701234567012345670")
177 testboth("%#o", -big, "-012345670123456701234567012345670")
178 testboth("%#.34o", -big, "-0012345670123456701234567012345670")
179 testboth("%#+.34o", big, "+0012345670123456701234567012345670")
180 testboth("%# .34o", big, " 0012345670123456701234567012345670")
181 testboth("%#+.34o", big, "+0012345670123456701234567012345670")
182 testboth("%#-+.34o", big, "+0012345670123456701234567012345670")
183 testboth("%#-+37.34o", big, "+0012345670123456701234567012345670 ")
184 testboth("%#+37.34o", big, " +0012345670123456701234567012345670")
186 testboth("%.33o", big, "012345670123456701234567012345670")
188 testboth("%#.33o", big, "012345670123456701234567012345670")
190 testboth("%#.32o", big, "012345670123456701234567012345670")
192 testboth("%034.33o", big, "0012345670123456701234567012345670")
194 testboth("%0#34.33o", big, "0012345670123456701234567012345670")
195 testboth("%o", float(big), "123456__________________________", 6)
198 testboth("%d", 42, "42")
199 testboth("%d", -42, "-42")
200 testboth("%d", 42L, "42")
201 testboth("%d", -42L, "-42")
202 testboth("%d", 42.0, "42")
203 testboth("%#x", 1, "0x1")
204 testboth("%#x", 1L, "0x1")
205 testboth("%#X", 1, "0X1")
206 testboth("%#X", 1L, "0X1")
207 testboth("%#x", 1.0, "0x1")
208 testboth("%#o", 1, "01")
209 testboth("%#o", 1L, "01")
210 testboth("%#o", 0, "0")
211 testboth("%#o", 0L, "0")
212 testboth("%o", 0, "0")
213 testboth("%o", 0L, "0")
214 testboth("%d", 0, "0")
215 testboth("%d", 0L, "0")
216 testboth("%#x", 0, "0x0")
217 testboth("%#x", 0L, "0x0")
218 testboth("%#X", 0, "0X0")
219 testboth("%#X", 0L, "0X0")
221 testboth("%x", 0x42, "42")
222 testboth("%x", -0x42, "-42")
223 testboth("%x", 0x42L, "42")
224 testboth("%x", -0x42L, "-42")
225 testboth("%x", float(0x42), "42")
227 testboth("%o", 042, "42")
228 testboth("%o", -042, "-42")
229 testboth("%o", 042L, "42")
230 testboth("%o", -042L, "-42")
231 testboth("%o", float(042), "42")