Completed
Push — master ( e2f766...6a3298 )
by Ionel Cristian
01:41
created

Foo.bar()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
dl 0
loc 2
rs 10
c 1
b 0
f 0
1
from aspectlib import test
2
3
4
class Foo(object):
5
    def bar(self):
6
        return 1
7
8
9
def test_fixture_1(weave):
10
    weave(Foo.bar, test.mock(2))
11
    assert Foo().bar() == 2
12
13
14
def test_fixture_2(weave):
15
    assert Foo().bar() == 1
16
17
    with weave(Foo.bar, test.mock(2)):
18
        assert Foo().bar() == 2
19
20
    assert Foo().bar() == 1
21