Currently, any ini options added via pytest_addoption are flagged as unknown. They should be registered.
conftest.py:
gnikonorov:gleb_test [master] $ cat conftest.py
def pytest_addoption(parser):
parser.addini("my_ini", "")
gnikonorov:gleb_test [master] $
pytest.ini:
gnikonorov:gleb_test [master] $ cat pytest.ini
[pytest]
my_ini=1
minversion = 3.0.0
gnikonorov:gleb_test [master] $
gnikonorov:gleb_test [master] $ pytest
WARNING: Unknown config ini key: my_ini
...
gnikonorov:gleb_test [master] $
It's an easy fix, I placed the validation check in the wrong place. I'll have a PR up today
Hello, @gnikonorov
I'm sorry for bothering you, but when the fix for this problem will land in released version on PyPI? I currently use version 6.1.1, but the issue is still there.
@vitvakatu When you go to a PR (#7384) and click the commit ID at the bottom ("nicoddemus merged commit 4cc4ebf into pytest-dev:master"), you can see which version that commit is in:

So this has been in 6.0.0 already, and I can't reproduce the issue with the reproducer in the original post. If you're still running into problems, please open a separate issue.
No worries @vitvakatu!
Looks like @The-Compiler beat me to the answer. If you're experiencing an issue it's probably best to open a new issue like he mentioned.
Thank you! Looks like it was my mistake, can't reproduce after some refactoring
Most helpful comment
@vitvakatu When you go to a PR (#7384) and click the commit ID at the bottom ("nicoddemus merged commit 4cc4ebf into pytest-dev:master"), you can see which version that commit is in:
So this has been in 6.0.0 already, and I can't reproduce the issue with the reproducer in the original post. If you're still running into problems, please open a separate issue.