tests.check_dir_test   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 13
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_check_dir() 0 13 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