fix issue472: clarify that ``pytest.config.getvalue()`` cannot work
if it's triggered ahead of command line parsing.
This commit is contained in:
parent
8f7b53e55b
commit
892aa457be
|
@ -18,6 +18,9 @@ NEXT (2.6)
|
||||||
- fix issue490: include pytest_load_initial_conftests in documentation
|
- fix issue490: include pytest_load_initial_conftests in documentation
|
||||||
and improve docstring.
|
and improve docstring.
|
||||||
|
|
||||||
|
- fix issue472: clarify that ``pytest.config.getvalue()`` cannot work
|
||||||
|
if it's triggered ahead of command line parsing.
|
||||||
|
|
||||||
|
|
||||||
2.5.2
|
2.5.2
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
|
@ -286,4 +286,9 @@ The equivalent with "boolean conditions" is::
|
||||||
def test_function(...):
|
def test_function(...):
|
||||||
pass
|
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.
|
||||||
|
|
Loading…
Reference in New Issue