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

src.aspectlib.autocleaned_weave()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 4
rs 10
1
import pytest
2
import aspectlib
3
4
5
@pytest.fixture
6
def weave(request):
7
    def autocleaned_weave(*args, **kwargs):
8
        entanglement = aspectlib.weave(*args, **kwargs)
9
        request.addfinalizer(entanglement.rollback)
10
        return entanglement
11
12
    return autocleaned_weave
13