| Total Complexity | 2 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import os |
||
| 2 | |||
| 3 | |||
| 4 | def make_test_module(): |
||
| 5 | """ |
||
| 6 | A function with side-effect of creating a python module |
||
| 7 | for containing tests at the root of a project. |
||
| 8 | """ |
||
| 9 | if os.path.exists('./test'): |
||
| 10 | return None |
||
| 11 | # If there is a test module present |
||
| 12 | # at the target location, exit. |
||
| 13 | |||
| 14 | os.mkdir('./test') |
||
| 15 | # If there is no `test` module, create one |
||
| 16 | |||
| 17 | open('./test/__init__.py', 'a').close() |
||
| 18 | # Create an __init__.py so that |
||
| 20 |