From fec656b3b1a62ccbc6e026924577d9c9955bd1a6 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 27 Feb 2019 07:46:03 -0300 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: nicoddemus --- doc/en/assert.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/en/assert.rst b/doc/en/assert.rst index adefe89bb..e7e78601b 100644 --- a/doc/en/assert.rst +++ b/doc/en/assert.rst @@ -274,7 +274,7 @@ Assertion rewriting caches files on disk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``pytest`` will write back the rewritten modules to disk for caching. You can disable -this behavior (for example to avoid leaving stable ``.pyc`` files around in projects that +this behavior (for example to avoid leaving stale ``.pyc`` files around in projects that move files around a lot) by adding this to the top of your ``conftest.py`` file: .. code-block:: python @@ -283,7 +283,7 @@ move files around a lot) by adding this to the top of your ``conftest.py`` file: sys.dont_write_bytecode = True -Note that you still get the benefits of assertion introspection, only change is that +Note that you still get the benefits of assertion introspection, the only change is that the ``.pyc`` files won't be cached on disk. Additionally, rewriting will silently skip caching if it cannot write new ``.pyc`` files, @@ -295,7 +295,7 @@ Disabling assert rewriting ``pytest`` rewrites test modules on import by using an import hook to write new ``pyc`` files. Most of the time this works transparently. -However, if you are messing with import yourself, the import hook may +However, if you are working with the import machinery yourself, the import hook may interfere. If this is the case you have two options: