Completed
Push — master ( 574cdc...f85b61 )
by Bjorn
01:15
created

test_incorrect_extension()   A

Complexity

Conditions 2

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 3
rs 10
1
# -*- coding: utf-8 -*-
2
import pytest
3
4
from dkfileutils import which
5
6
7
def test_which():
8
    # find exists on both win an *nix
9
    assert len(list(which.which('find'))) > 0
10
11
12
def test_get_executable():
13
    assert which.get_executable('find')
14
15
16
def test_missing_executable():
17
    assert not which.get_executable('chewbaccascousin')
18
19
20
def test_incorrect_extension():
21
    with pytest.raises(ValueError):
22
        which.get_executable('foo.bar')
23