Révision 155 pobysoPythonSage/src/testPobyso.sage
testPobyso.sage (revision 155) | ||
---|---|---|
93 | 93 |
return timing |
94 | 94 |
# End test_pobyso_bounds_to_range_sa_so |
95 | 95 |
|
96 |
def test_pobyso_error_so(repeat=1000, number=10): |
|
97 |
functionName = inspect.stack()[0][3] |
|
98 |
print "Running", inspect.stack()[0][3], "..." |
|
99 |
# |
|
100 |
def test(): |
|
101 |
errorSo = pobyso_error_so() |
|
102 |
sollya_lib_clear_obj(errorSo) |
|
103 |
# |
|
104 |
wrapped = test_pobyso_wrapper(test) |
|
105 |
timing = min(timeit.repeat(wrapped, repeat=repeat, number=number)) |
|
106 |
print "\t...", functionName, "done." |
|
107 |
return timing |
|
108 |
# End test_pobyso_error_so |
|
109 |
|
|
96 | 110 |
def test_pobyso_get_list_elements_so_so(repeat = 1000, number=10): |
97 | 111 |
functionName = inspect.stack()[0][3] |
98 | 112 |
print "Running", functionName, "..." |
... | ... | |
176 | 190 |
intervalSo, |
177 | 191 |
errorSo, |
178 | 192 |
weightSo, |
179 |
degreeBoundSo) |
|
193 |
degreeBoundSo) |
|
194 |
""" |
|
195 |
pobyso_guess_degree_so_sa(funcExpSo, |
|
196 |
intervalSo, |
|
197 |
errorSo, |
|
198 |
None, |
|
199 |
None) |
|
200 |
""" |
|
180 | 201 |
wrapped = test_pobyso_wrapper(test) |
181 | 202 |
timing = min(timeit.repeat(wrapped, repeat=repeat, number=number)) |
182 | 203 |
print "\t...", functionName, "done." |
... | ... | |
188 | 209 |
return timing |
189 | 210 |
# End test_pobyso_guess_degree_so_sa |
190 | 211 |
|
212 |
def test_pobyso_is_error_so_sa(repeat=1000, number=10): |
|
213 |
functionName = inspect.stack()[0][3] |
|
214 |
print "Running", inspect.stack()[0][3], "..." |
|
215 |
# |
|
216 |
def test(): |
|
217 |
errorSo = pobyso_error_so() |
|
218 |
if not pobyso_is_error_so_sa(errorSo): |
|
219 |
print "Error!" |
|
220 |
sollya_lib_clear_obj(errorSo) |
|
221 |
# |
|
222 |
wrapped = test_pobyso_wrapper(test) |
|
223 |
timing = min(timeit.repeat(wrapped, repeat=repeat, number=number)) |
|
224 |
print "\t...", functionName, "done." |
|
225 |
return timing |
|
226 |
# End test_pobyso_error_so |
|
227 |
|
|
191 | 228 |
def test_pobyso_lib_init(iterationsNum=10000): |
192 | 229 |
""" |
193 | 230 |
Must be called exactly once. Leaks lots of memory otherwise. |
Formats disponibles : Unified diff