On Mon, 1 Jul 2019, Bruno Oliveira wrote:
Hmmm strange, because for "pytest.config" to be available, it means the
user is running the "pytest" command.
Yes, they are, but in the package within which the tests are created
and loaded, pytest_configure is not called because it is not a test
nor plugin itself and I don't want to require the user to have a
pytest_configure themselves.
As I said before: it's messy... :)
We don't have any plans to deprecate `metafunc.config`, as doing so would
break *tons* of code, and is really part of the API and no great downsides
(as opposed to the pytest.config which was a nasty global).
If you can't make the "pytest_configure" suggestion work, this seems OK to
me.
Thanks, I think I'll go with the metafunc way for now, since it
keeps the existing things working as expected. If I ever find some
additional time, or people who are interested, I can try to do the
work that will make the test generation my pytest-oriented, rather
than the messy hack it is now.
--
Chris Dent ٩◔̯◔۶ https://anticdent.org/
freenode: cdent
_______________________________________________
pytest-dev mailing list
pytest-dev@python.org
https://mail.python.org/mailman/listinfo/pytest-dev