Skip to content

Accept plugin configuration in pytest.ini #13078

Closed Answered by The-Compiler
pawamoy asked this question in Q&A
Discussion options

You must be logged in to vote

You will need to call Parser.addini() in pytest_addoption to declare your options, before you use Config.getini().

That doesn't let you define an entirely new section, however. Reading the ini yourself is definitely something I wouldn't recommend, as you probably won't be compatible with pytest configuration in pyproject.toml, and might have possible subtle syntax differences to pytest's ini parsing.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pawamoy
Comment options

Answer selected by pawamoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants