[pytest-dev] Using pytest for the sympy doctests

Ronny Pfannschmidt opensource at ronnypfannschmidt.de
Sun Dec 9 15:27:25 EST 2018


Am Sonntag, den 09.12.2018, 17:55 -0200 schrieb Bruno Oliveira:
> On Sun, Dec 9, 2018 at 4:35 PM Oscar Benjamin <
> oscar.j.benjamin at gmail.com> wrote:
> > It's not a huge problem. If it were possible to set them in
> > 
> > conftest.py I'd rather do that because the pytest.ini doesn't exist
> > 
> > yet and I'd like to keep everything in one file if possible.
> > 
> > 
> > 
> > I spent a little time trying to work out if was possible: I just
> > 
> > imagined there would be a generic way to set ini options from the
> > 
> > conftest.py file. It's not needed in this case but the advantage of
> > 
> > being able to set those things in conftest.py could be if you want
> > to
> > 
> > make them conditional on something.
> 
> Sure, makes sense. We could add a new "config.setini" option, for one
> it would allow users to set ini values in pytest_configure, I
> remember needing this in more than one occasion actually.
> 
> There's a discussion about this in 
> https://github.com/pytest-dev/pytest/issues/3311, in there the OP
> wanted to do this so plugins could change ini options from other
> plugins (all under his control) so it was considered a little
> brittle, but I think the use case for changing ini variables during
> pytest_configure like you describe is a strong motivation for us to
> add this API.
> 
> Ronny, what's your opinion?

my personal preference is to remove support for programatic changing of
options with the config object - it makes things horrendous for various
reasons,even addinilines is one too much
-- Ronny
> Cheers,
> Bruno.
> 
> _______________________________________________pytest-dev mailing 
> listpytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20181209/b9870766/attachment.html>


More information about the pytest-dev mailing list