mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-28 12:33:59 +03:00
Add typing tests
This commit is contained in:
parent
f68b59f9ed
commit
e2f8849dba
|
@ -14,7 +14,11 @@ config2.from_ini(Path("config.ini"))
|
||||||
|
|
||||||
config2.from_yaml("config.yml")
|
config2.from_yaml("config.yml")
|
||||||
config2.from_yaml(Path("config.yml"))
|
config2.from_yaml(Path("config.yml"))
|
||||||
|
|
||||||
config2.from_env("ENV", "default")
|
config2.from_env("ENV", "default")
|
||||||
|
config2.from_env("ENV", as_=int, default=123)
|
||||||
|
config2.from_env("ENV", as_=float, required=True)
|
||||||
|
config2.from_env("ENV", as_=lambda env: str(env))
|
||||||
|
|
||||||
# Test 3: to check as_*() methods
|
# Test 3: to check as_*() methods
|
||||||
config3 = providers.Configuration()
|
config3 = providers.Configuration()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user