diff --git a/tests/typing/configuration.py b/tests/typing/configuration.py index b6005004..4a4c7f95 100644 --- a/tests/typing/configuration.py +++ b/tests/typing/configuration.py @@ -14,7 +14,11 @@ config2.from_ini(Path("config.ini")) config2.from_yaml("config.yml") config2.from_yaml(Path("config.yml")) + 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 config3 = providers.Configuration()