test_159_alias_to_self_recursion_error   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_it_now_works() 0 8 1
1
# https://github.com/meadsteve/lagom/issues/159
2
import abc
3
4
from lagom import Container
5
6
7
class AbstractFoo(abc.ABC):
8
    pass
9
10
11
class Foo(AbstractFoo):
12
    pass
13
14
15
def test_it_now_works():
16
    container = Container()
17
    container[AbstractFoo] = Foo
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable Foo does not seem to be defined.
Loading history...
18
19
    # This is/was the root cause of the issue
20
    container[Foo] = Foo
21
22
    assert isinstance(container[AbstractFoo], Foo)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable AbstractFoo does not seem to be defined.
Loading history...
23