fix issue472: clarify that ``pytest.config.getvalue()`` cannot work

if it's triggered ahead of command line parsing.
This commit is contained in:
holger krekel 2014-03-26 07:15:54 +01:00
parent 8f7b53e55b
commit 892aa457be
2 changed files with 8 additions and 0 deletions

View File

@ -18,6 +18,9 @@ NEXT (2.6)
- fix issue490: include pytest_load_initial_conftests in documentation
and improve docstring.
- fix issue472: clarify that ``pytest.config.getvalue()`` cannot work
if it's triggered ahead of command line parsing.
2.5.2
-----------------------------------

View File

@ -286,4 +286,9 @@ The equivalent with "boolean conditions" is::
def test_function(...):
pass
.. note::
You cannot use ``pytest.config.getvalue()`` in code
imported before py.test's argument parsing takes place. For example,
``conftest.py`` files are imported before command line parsing and thus
``config.getvalue()`` will not execute correctly.