Completed
Push — master ( 790092...745d04 )
by Charles
02:04
created

test_output_command_error()   A

Complexity

Conditions 2

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
dl 0
loc 5
rs 9.4285
c 1
b 0
f 0
1
# -*- coding: utf-8 -*-
2
3
from mock import patch
4
import pytest
5
import subprocess
6
from git_app_version.helper.process import *
7
8
@patch('git_app_version.helper.process.subprocess')
9
def test_output_command_error(mock_sub_process):
10
    mock_sub_process.check_output.side_effect = subprocess.CalledProcessError(1, '/bin/false', '')
11
12
    assert output_command('/bin/false') == ''
13