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

tests.test_fixture_2()   B

Complexity

Conditions 5

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 5
dl 0
loc 7
rs 8.5454
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