Add note about not monkey-patching builtins (#1986)

* Add note about not monkey-patching builtins

Related to #1985

* Mention -s as well
This commit is contained in:
Bruno Oliveira 2016-10-05 12:57:40 -03:00 committed by Ronny Pfannschmidt
parent d47ae799a7
commit 50b960c1f0
1 changed files with 8 additions and 0 deletions

View File

@ -55,6 +55,14 @@ will delete the method ``request.session.Session.request``
so that any attempts within tests to create http requests will fail.
.. note::
Be advised that it is not recommended to patch builtin functions such as ``open``,
``compile``, etc., because it might break pytest's internals. If that's
unavoidable, passing ``--tb=native``, ``--assert=plain`` and ``--capture=no`` might
help althought there's no guarantee.
Method reference of the monkeypatch fixture
-------------------------------------------