Passed
Push — master ( 65fdce...99d2f2 )
by Jace
43s
created

describe_output()   A

Complexity

Conditions 2

Size

Total Lines 5

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 5
rs 9.4285

1 Method

Rating   Name   Duplication   Size   Complexity  
A it_uses_the_caller_name() 0 3 1
1
# pylint: disable=redefined-outer-name,unused-variable,expression-not-assigned,singleton-comparison
2
3
import log
4
5
from . import demo
6
7
8
def describe_api():
9
10
    def it_has_custom_warn_function(expect):
11
        expect(log.warn) == log.warning
12
13
14
def describe_output():
15
16
    def it_uses_the_caller_name(expect, caplog):
17
        demo.foobar()
18
        expect(caplog.text) == "ERROR: tests.demo: Hello, world!\n"
19