Total Complexity | 1 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
2 | from dvnv.utils import check_dir |
||
3 | |||
4 | |||
5 | def test_check_dir(tmp_path): |
||
6 | nonexistent = tmp_path / "nonexistent" |
||
7 | assert check_dir(nonexistent) is False |
||
8 | |||
9 | empty = tmp_path / "empty" |
||
10 | empty.mkdir() |
||
11 | assert check_dir(empty) is False |
||
12 | |||
13 | working = tmp_path / "working" |
||
14 | working.mkdir() |
||
15 | file = working / "file" |
||
16 | file.touch() |
||
17 | assert check_dir(working) is True |
||
18 |