# libtmux.pytest_plugin.clear_env

- **Module:** libtmux.pytest_plugin
- **Package:** libtmux
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/pytest_plugin.py#L117
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-pytest_plugin-clear_env/

```
libtmux.pytest_plugin.clear_env(
    monkeypatch: pytest.MonkeyPatch,
) -> None
```

Clear out any unnecessary environment variables that could interrupt tests.

tmux [show-environment](/en/tmux/latest/manual/show-environment/) tests were being interrupted due to a lot of crazy env vars.

## Parameters

- `monkeypatch` (`pytest.MonkeyPatch`)
