Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>INI Config Assistant for pytestNew to Visual Studio Code? Get it now.
INI Config Assistant for pytest

INI Config Assistant for pytest

Honestrel

| (0) | Free
Completion, hover docs and checks for pytest settings in pytest.ini, .pytest.ini, tox.ini ([pytest]) and setup.cfg ([tool:pytest]): typos, bad values, wrong section headers and missing testpaths.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

INI Config Assistant for pytest

Completion, hover documentation and checks for pytest settings written in INI files: pytest.ini, .pytest.ini, tox.ini (the [pytest] section) and setup.cfg (the [tool:pytest] section).

Why

If you keep your pytest settings in pyproject.toml, VS Code can already check them through JSON schemas. Settings in the classic INI files get nothing: no list of option names, no explanation of what xfail_strict or log_cli_level does, and a typo such as testpath = tests only shows up later as a vague "Unknown config option" warning in the test output (or not at all, if nobody reads it). This extension fills that gap.

Features

  • Completion of option names inside the pytest section, with a short description, the type, the default value and the pytest version that introduced newer options. Choosing an option inserts name = with the valid values offered as a choice (for example true/false, the console_output_style styles, the junit_family formats or the log_cli_level levels).
  • Completion of values after name = for true/false options, options with a fixed set of values, and log levels.
  • Completion of the section header: [pytest] in pytest.ini/tox.ini, [tool:pytest] in setup.cfg.
  • Hover on an option name shows its documentation and a link to the matching entry of the pytest reference.
  • Checks (shown in the Problems panel):
    • wrong section header for the file: [pytest] in setup.cfg (pytest stops with an error), [tool:pytest] in pytest.ini or tox.ini (pytest ignores it), or a header with extra spaces or capitals (pytest matches names exactly) - with a quick fix;
    • option names that are not built into pytest: a likely typo is a warning with Did you mean ...? and a quick fix; anything else is an information note, because it may be a plugin's option;
    • invalid values for true/false options, options with a fixed set of values, log levels, numbers, verbosity_* options and minversion;
    • comments at the end of a value line (log_cli = true # live): pytest does not strip them in INI files, so the value becomes invalid - with a quick fix;
    • testpaths entries (without wildcards) that do not exist next to the config file;
    • options set twice and other lines pytest's INI reader rejects.
  • Multi-line (indented) values and # / ; comment lines are understood the same way pytest reads them.
  • In tox.ini and setup.cfg, every section that is not the pytest section ([tox], [testenv], [metadata], ...) is left alone.

The list of built-in options follows the pytest 9.2 reference and includes options up to 9.2 (newer ones are marked "pytest >= X"). xfail_strict and its pytest 9 name strict_xfail are both known.

Usage

Install the extension and open any pytest.ini, .pytest.ini, tox.ini or setup.cfg. Nothing else is needed: no Python interpreter, no pytest installation and no network access. The files are read as plain text inside VS Code.

Settings

Setting Default What it does
pytestIniAssistant.extraOptions [] Option names added by plugins you use (for example asyncio_mode, timeout, DJANGO_SETTINGS_MODULE). They are treated as known.
pytestIniAssistant.reportUnknownOptions true Show the information note for unknown names that do not look like typos.
pytestIniAssistant.checkTestpaths true Warn about testpaths entries that do not exist.

Known limitations

  • Options registered by plugins are not known unless you list them in pytestIniAssistant.extraOptions.
  • Values are checked for the built-in options only; free-text options such as addopts or filterwarnings are not validated.
  • testpaths is checked relative to the folder of the config file (pytest's rootdir in the usual case); entries with wildcards are skipped.
  • pyproject.toml and pytest.toml are not handled (VS Code already has schema support for TOML-based setups through other extensions).

About

This is an independent extension. It is not an official pytest product and is not affiliated with or endorsed by the pytest project or its authors. It was built with AI assistance by Honestrel and its behaviour was checked against pytest's documentation and real pytest runs. Feedback is welcome on the Marketplace page.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft