Add typing tests

This commit is contained in:
Roman Mogylatov 2021-12-20 18:45:28 +02:00
parent f68b59f9ed
commit e2f8849dba

View File

@ -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()