Code Duplication    Length = 17-17 lines in 2 locations

tests/test_injectors/test_inject_decorated_method.py 1 location

@@ 18-34 (lines=17) @@
15
    return wrapper
16
17
18
def test_head_injector_correctly_injects_decorated_method():
19
    class Target:
20
        @decorate
21
        def target(self, x):
22
            a = 10
23
            if x > a:
24
                a = x
25
            return a
26
27
    @inject(target=Target.target, injector=HeadInjector())
28
    def handler():
29
        x = 11
30
31
    target = Target()
32
    assert target.target(0) == 11
33
    assert target.target(10) == 11
34
    assert target.target(101) == 11
35
36
37
def test_tail_injector_correctly_injects_decorated_method():

tests/test_injectors/test_inject_static_method.py 1 location

@@ 11-27 (lines=17) @@
8
)
9
10
11
def test_head_injector_correctly_injects_static_method():
12
    class Target:
13
        @staticmethod
14
        def target(x):
15
            a = 10
16
            if x > a:
17
                a = x
18
            return a
19
20
    @inject(target=Target.target, injector=HeadInjector())
21
    def handler():
22
        x = 11
23
24
    target = Target()
25
    assert target.target(0) == 11
26
    assert target.target(10) == 11
27
    assert target.target(101) == 11
28
29
30
def test_tail_injector_correctly_injects_static_method():