tests.test_objects_with_referential_loops   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A B.__init__() 0 2 1
A A.__init__() 0 2 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_definition_loops_return_a_sensible_error() 0 3 1
1
import pytest
2
3
from lagom import Container
4
5
6
class A:
7
    def __init__(self, b: "B"):
8
        pass
9
10
11
class B:
12
    def __init__(self, a: "A"):
13
        pass
14
15
16
@pytest.mark.skip(reason="Up next to be fixed")
17
def test_definition_loops_return_a_sensible_error(container: Container):
18
    resolved = container.resolve(B)
19