(path)
| 98 | |
| 99 | |
| 100 | def generate_slices(path): |
| 101 | # loop used to build slices_res.py with cpython |
| 102 | ll = [0, 1, 2, 3] |
| 103 | start = list(range(-7, 7)) |
| 104 | end = list(range(-7, 7)) |
| 105 | step = list(range(-5, 5)) |
| 106 | step.pop(step.index(0)) |
| 107 | for i in [start, end, step]: |
| 108 | i.append(None) |
| 109 | |
| 110 | slices_res = [] |
| 111 | for s in start: |
| 112 | for e in end: |
| 113 | for t in step: |
| 114 | slices_res.append(ll[s:e:t]) |
| 115 | |
| 116 | path.write_text( |
| 117 | "SLICES_RES={}\nSTART= {}\nEND= {}\nSTEP= {}\nLL={}\n".format( |
| 118 | slices_res, start, end, step, ll |
| 119 | ) |
| 120 | ) |
| 121 | |
| 122 | |
| 123 | @populate("cpython") |
no test coverage detected