File tree Expand file tree Collapse file tree 3 files changed +5
-19
lines changed
samples/wiringfastdepends Expand file tree Collapse file tree 3 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,6 @@ Just use it within ``Depends``
47
47
container = Container()
48
48
container.wire(modules = [sys.modules[__name__ ]])
49
49
50
- assert apply_coefficient(100 ) == 120.0
50
+ apply_coefficient(100 ) == 120.0
51
51
52
52
Original file line number Diff line number Diff line change 1
- from dependency_injector .wiring import inject , Provide
2
- from fast_depends import Depends
3
-
4
- # Runtime import to avoid syntax errors in samples on Python < 3.5 and reach top-dir
5
- import os
6
-
7
- _SAMPLES_DIR = os .path .abspath (
8
- os .path .sep .join (
9
- (
10
- os .path .dirname (__file__ ),
11
- "../samples/" ,
12
- )
13
- ),
14
- )
15
1
import sys
16
2
17
- sys .path .append (_SAMPLES_DIR )
18
-
19
-
3
+ from dependency_injector .wiring import inject , Provide
4
+ from fast_depends import Depends
20
5
from wiringfastdepends .sample import CoefficientService , Container
21
6
22
7
Original file line number Diff line number Diff line change @@ -27,4 +27,5 @@ def apply_coefficient(
27
27
container = Container ()
28
28
container .wire (modules = [sys .modules [__name__ ]])
29
29
30
- assert apply_coefficient (100 ) == 120.0
30
+ def test_apply_coefficient ():
31
+ assert apply_coefficient (100 ) == 120.0
You can’t perform that action at this time.
0 commit comments