1

Say I've got some python code with an embed breakpoint like so:

from IPython import embed

def my_func(self):
  some_var = 'awesome sauce'
  embed()
  # other stuff happens

when I run my test runner... with say pytest:

$ python -m pytest -k test_something_awesome

How can my ipython terminal give me the contextual code around my embed breakpoint?

So instead of:

enter image description here

I would get something similar to ruby's PRY output like:

enter image description here

daino3
  • 4,386
  • 37
  • 48

0 Answers0