Skip to content

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.

Home

Building locally
Tips

Install Frequently Asked Questions

Running on HPC

Users

Developers Notes

Minutes and agenda of Firedrake meetings


Policies and procedures

Gravity wave scaling

Merge Complex Sprint

Reading Group

Firedrake 2021 Planning Meetings
Clone this wiki locally