# libtmux.pytest_plugin.config_file

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

```
libtmux.pytest_plugin.config_file(
    user_path: pathlib.Path,
) -> pathlib.Path
```

Return fixture for ``.tmux.conf`` configuration.

- [`base-index -g 1`](/en/tmux/latest/catalog/options/base-index/)

These guarantee pane and windows targets can be reliably referenced and asserted.

Note: You will need to set the home directory, see :ref:`set_home`.

## Parameters

- `user_path` (`pathlib.Path`)
