#environment-variables

[ follow ]
fromdaniel.feldroy.com
3 days ago

TIL: Setting environment variables for pytest

When writing tests in pytest, often there's a need to set environment variables for your tests. Instead of modifying `os.environ` directly, which can lead to side effects and make tests harder to manage, here's how to do it with the [pytest-env](https://pypi.org/project/pytest-env/) package. First, install the package. ```sh pip install pytest-env # classic but works great uv add pytest-env # if you're one of us cool kids using uv uv add pytest-env --group test # if you use a specific test group of dependencies ```
Python
Node JS
fromLogRocket Blog
4 months ago

How to configure Next.js environmental variables - LogRocket Blog

Environment variables in Next.js help separate code from configuration for secure and flexible application management.
[ Load more ]