Skip to content

confcutdir not recognised when defined in pytest.ini #9210

@craigds

Description

@craigds

The docs mention the confcutdir config option, but actually setting it in a pytest.ini gives a warning about it being unknown.

Steps to minimally reproduce the problem

virtualenv -p python3.7 v
. v/bin/activate
v/bin/pip install pytest

echo '[pytest]
confcutdir = .
' > pytest.ini

pytest

output:

$ pytest
========================================================== test session starts ==========================================================
platform darwin -- Python 3.7.9, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /Users/cdestigter/f, configfile: pytest.ini
collected 0 items

=========================================================== warnings summary ============================================================
v/lib/python3.7/site-packages/_pytest/config/__init__.py:1233
  /Users/cdestigter/f/v/lib/python3.7/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: confcutdir

    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================== 1 warning in 0.01s ===========================================================

Using --confcutdir=. when invoking pytest does work; it just doesn't work in a pytest.ini

os/etc

  • MacOS 11.6
  • pytest 6.2.5
  • python 3.7.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressedtype: docsdocumentation improvement, missing or needing clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions