Returns a nested list with the given 'sizes' for test purposes.
(sizes, i=0, value=[0])
| 171 | return type(data).__name__ |
| 172 | |
| 173 | def nested_list(sizes, i=0, value=[0]): |
| 174 | """ Returns a nested list with the given 'sizes' for test purposes. """ |
| 175 | if i == len(sizes)-1: |
| 176 | data = [] |
| 177 | for _ in range(sizes[i]): |
| 178 | data.append( value[0] ) |
| 179 | value[0]+=1 |
| 180 | else: |
| 181 | data = [] |
| 182 | for size in range(sizes[i]): |
| 183 | data.append( nested_list(sizes,i+1) ) |
| 184 | return data |
| 185 | |
| 186 | def my_round(value): |
| 187 | """ Rounds the value to the nearest integer rounding '.5' up consistantly. """ |
nothing calls this directly
no outgoing calls
no test coverage detected