Test Failed
Push — main ( 519f95...989b39 )
by J
01:55
created

tests.confirm_test   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_confirm() 0 6 1
1
# -*- coding: utf-8 -*-
2
from io import StringIO
3
from devenv.utils import confirm
4
5
6
def test_confirm(monkeypatch):
7
    monkeypatch.setattr("sys.stdin", StringIO("Y\n"))
8
    assert confirm() is True
9
10
    monkeypatch.setattr("sys.stdin", StringIO("f\n"))
11
    assert confirm() is False
12