use hatch-dotenv plugin to load env vars for tests

fail fast if .test.env is not found
This commit is contained in:
2026-02-09 01:50:34 +00:00
parent 7f3d47e7b0
commit d88a0b62ad
2 changed files with 9 additions and 5 deletions

View File

@@ -35,6 +35,9 @@ obsws-cli = "obsws_cli:app"
[tool.hatch.version]
path = "obsws_cli/__about__.py"
[tool.hatch.env]
requires = ["hatch-dotenv"]
[tool.hatch.envs.default]
dependencies = ["click-man>=0.5.1"]
@@ -45,6 +48,10 @@ man = "python man/generate.py --output=./man"
[tool.hatch.envs.hatch-test]
randomize = true
[tool.hatch.env.collectors.dotenv.hatch-test]
env-files = [".env", ".test.env"]
fail-on-missing = true
[tool.hatch.envs.types]
extra-dependencies = ["mypy>=1.0.0"]
[tool.hatch.envs.types.scripts]