Skip to content

Commit

Permalink
Update test and README
Browse files Browse the repository at this point in the history
  • Loading branch information
alanbernstein authored and gotcha committed May 26, 2021
1 parent 11f7434 commit 310544e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ You can also enclose code with the ``with`` statement to launch ipdb if an excep
Adding a context manager implies dropping Python 2.4 support.
Use ``ipdb==0.6`` with 2.4.

Or you can use ``iex`` as a function decorator to launch ipdb if an exception is raised:

.. code-block:: python
from ipdb import iex
@iex
def main():
[...]
.. warning::
Using ``from future import print_function`` for Python 3 compat implies dropping Python 2.5 support.
Use ``ipdb<=0.8`` with 2.5.
Expand Down
3 changes: 2 additions & 1 deletion tests/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
class ImportTest(unittest.TestCase):

def test_import(self):
from ipdb import set_trace, post_mortem, pm, run, runcall, runeval
from ipdb import set_trace, post_mortem, pm, iex, run, runcall, runeval
set_trace # please pyflakes
post_mortem # please pyflakes
pm # please pyflakes
iex # please pyflakes
run # please pyflakes
runcall # please pyflakes
runeval # please pyflakes

0 comments on commit 310544e

Please sign in to comment.