(context, case)
| 182 | """))) |
| 183 | |
| 184 | def nest_case(context, case): |
| 185 | # Detect indentation |
| 186 | lines = context.strip().splitlines() |
| 187 | prefix_len = 0 |
| 188 | for c in lines[-1]: |
| 189 | if c != ' ': |
| 190 | break |
| 191 | prefix_len += 1 |
| 192 | |
| 193 | indented_case = indent(case, ' ' * (prefix_len + 4)) |
| 194 | return context + '\n' + indented_case |
| 195 | |
| 196 | # Gather and run the tests |
| 197 |