Skip to content

Add (or move) self-contained-html option to the INI configuration file (pytest.ini) #719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
harmin-parra opened this issue Aug 19, 2023 · 1 comment

Comments

@harmin-parra
Copy link
Contributor

harmin-parra commented Aug 19, 2023

As discussed in the comments of #521, I would love to be able to set the self-contained-html option in the INI file.

I guess the fix would only require the addition of this piece of code:

parser.addini(
    "self-contained-html",
    type="bool",
    default=False,
    help="create a self-contained html file.",
)

The question would be:

Should the INI option name be identical to the command-line option (self-contained-html) ?
or should the dash be replaced by underscore (self_contained_html) ?

@BeyondEvil
Copy link
Contributor

You can already achieve this by using addopts.

[pytest]
addopts =
    --self-contained-html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants