Conditions | 2 |
Total Lines | 14 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import os |
||
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 |