tests.check_dir_test.test_check_dir()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 13
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 13
rs 9.85
c 0
b 0
f 0
cc 1
nop 1
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