fix faq once more to get rid of the strange "missed" bit.

This commit is contained in:
holger krekel 2012-06-18 11:47:57 +02:00
parent f176ee3a1c
commit 672919a8e2
1 changed files with 8 additions and 9 deletions

View File

@ -61,15 +61,14 @@ This completely avoids previous issues of confusing assertion-reporting.
It also means, that you can use Python's ``-O`` optimization without loosing It also means, that you can use Python's ``-O`` optimization without loosing
assertions in test modules. assertions in test modules.
py.test contains a second assert debugging technique, invoked via py.test contains a second mostly obsolete assert debugging technique,
``--assert=reinterpret``, activated by default on Python-2.5: When an invoked via ``--assert=reinterpret``, activated by default on
``assert`` statement that was missed by the rewriter fails, py.test Python-2.5: When an ``assert`` statement fails, py.test re-interprets
re-interprets the expression to show intermediate values if a test the expression part to show intermediate values. This technique suffers
fails. This second technique suffers from a caveat that the rewriting from a caveat that the rewriting does not: If your expression has side
does not: If your expression has side effects (better to avoid them effects (better to avoid them anyway!) the intermediate values may not
anyway!) the intermediate values may not be the same, confusing the be the same, confusing the reinterpreter and obfuscating the initial
reinterpreter and obfuscating the initial error (this is also explained error (this is also explained at the command line if it happens).
at the command line if it happens).
You can also turn off all assertion interaction using the You can also turn off all assertion interaction using the
``--assertmode=off`` option. ``--assertmode=off`` option.