Passed
Push — main ( c1045d...51e60d )
by J
01:24
created

tests.main_test   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 11
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_empty_dir() 0 7 3
1
# -*- coding: utf-8 -*-
2
import sys
3
from unittest.mock import patch
4
import pytest
5
from devenv.devenv import main, parse_args
6
7
8
def test_empty_dir(tmp_path):
9
    with patch.object(
10
        sys, "argv", ["devenv", "--scripts_path", tmp_path.name, "python", "devenv"]
11
    ):
12
        args = parse_args()
13
        with pytest.raises(SystemError):
14
            main(args)
15