-
Notifications
You must be signed in to change notification settings - Fork 166
breakpoint() builtin not working with pytest
Connor Ward edited this page May 31, 2023
·
1 revision
One curious feature of an activated Firedrake environment is that the Python builtin breakpoint()
function no longer works when run with pytest
, but the more verbose import pdb; pdb.set_trace()
still does. This is caused by the Python package used for testing notebooks, nbval
, and the interplay between testing for code coverage and setting breakpoints (related issue).
The standard behaviour of breakpoint()
may be achieved by either uninstalling nbval
(pip uninstall nbval
), or disabling the nbval
plugin by passing -p no:nbval
to pytest
on the command line.