| Conditions | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import os |
||
| 39 | def test_ensure_file_directory(self): |
||
| 40 | directory = str(uuid4()) |
||
| 41 | file_name = str(uuid4()) + '.txt' |
||
| 42 | directory_path = os.path.join(self.base_path, directory) |
||
| 43 | path = os.path.join(directory_path, file_name) |
||
| 44 | |||
| 45 | ensure_file_directory(path) |
||
| 46 | |||
| 47 | self.assertTrue(os.path.exists(directory_path)) |
||
| 48 | |||
| 49 | # make sure nothing happens on second call |
||
| 50 | ensure_file_directory(path) |
||
| 51 | |||
| 55 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.