You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a `pytest` plugin that enables you to set environment variables in a `pytest.ini`or `pyproject.toml`file.
9
+
This is a `pytest` plugin that enables you to set environment variables in `pytest.ini`, `pyproject.toml`, `pytest.toml`or `.pytest.toml`files.
10
10
11
11
## Installation
12
12
@@ -18,7 +18,14 @@ pip install pytest-env
18
18
19
19
## Usage
20
20
21
-
### Native form in `pyproject.toml`
21
+
### Native form in `pyproject.toml`, `pytest.toml` and `.pytest.toml`
22
+
23
+
> [!NOTE]
24
+
> `pytest.toml` and `.pytest.toml` is only supported on Pytest 9.0+.
25
+
26
+
Native form takes precedence over the `pytest.ini` form. `pytest.toml` takes precedence over `.pytest.toml`, and that takes precedence over `pyproject.toml`.
The `tool.pytest_env` (`pytest_env` in `pytest.toml` and `.pytest.toml`) tables keys are the environment variables keys to set. The right hand side of the assignment:
32
49
33
50
- if an inline table you can set options via the `transform` or `skip_if_set` keys, while the `value` key holds the
34
51
value to set (or transform before setting). For transformation the variables you can use is other environment
0 commit comments