Prevent error on exit if some code messes with sys.meta_path and removes the
assertionrewrite hook (CaptureMock seems to do this):
File "/Users/marca/dev/hg-repos/pytest/_pytest/assertion/__init__.py", line 64, in pytest_unconfigure
sys.meta_path.remove(hook)
ValueError: list.remove(x): x not in list
--HG--
branch : sys_meta_path_remove_hook_only_if_present
The `=` is better because it encourages folks to use the form that doesn't
suffer from issue #436 (https://bitbucket.org/hpk42/pytest/issue/436), which
can cause the arg to be treated as an "anchor" and used as the (unexpected)
path for searching for conftest.py files.
--HG--
branch : help_show_args_with_equals_instead_of_space
use the original stream.
- avoid resetting capture FDs/sys.stdout for each test by keeping capturing
always turned on and looking at snapshotted capturing data during runtest
and collection phases.
between working at the front and at the end of a hook call chain.
The idea is to make it easier for a plugin to "wrap" a certain hook
call and use context managers, in particular allow a major cleanup of
capturing.
- node.warn() for a node-specific warning
- config.warn() for a global non-node specific warning
Each warning is accompanied by a "warning number" so that we can later
introduce mechanisms for surpressing them.
Each warning will trigger a call to pytest_report_warn(number, node, message)
which is by default implemented by the TerminalReporter which introduces
a new option "-rw" to show details about warnings.
small number of changes:
- removed hard-coded links to package release versions, using
a placeholder "latest" instead which is understood by pytest-plugs
- testing against pytest-2.5.2
This changes were implemented so this page only needs
to be updated after pytest releases, not after each package version changes;.
Documented that since pytest 2.4.0 you can use the raw pdb.set_trace() call
directly without the pytest.set_trace() wrapper or explicitly disabling pytest's
output capture using 'py.test -s'.
Clearly stated how pytest (since version 2.0.0.) automatically disables its
output capture when entering an interactive PDB debugger. This avoids confusing
new users because their tests display different output when running with or
without entering an interactive debugger (even if user does nothing in that
interactive debugger session other than exit it and continue with the regular
test execution).
--HG--
branch : pdb_doc_update