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

tests.main_test.test_empty_dir()   A

Complexity

Conditions 3

Size

Total Lines 7
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 3
nop 1
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