Completed
Push — master ( 78e743...e8dc26 )
by Ionel Cristian
56s
created

tests.Foo   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 3
Duplicated Lines 0 %
Metric Value
dl 0
loc 3
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A bar() 0 2 1
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