When I set a breakpoint in my pytest test functions, it seems to be debugging within the functions called by test rather than the test itself:
<code>def test_my_function():
test_value = np.random.choice(...)
breakpoint()
</code>
<code>def test_my_function():
test_value = np.random.choice(...)
breakpoint()
</code>
def test_my_function():
test_value = np.random.choice(...)
breakpoint()
<code>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>
--Call--
> .../venv/lib/python3.9/site-packages/numpy/_core/fromnumeric.py(3063)_prod_dispatcher()
</code>
<code>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>
--Call--
> .../venv/lib/python3.9/site-packages/numpy/_core/fromnumeric.py(3063)_prod_dispatcher()
</code>
>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>
--Call--
> .../venv/lib/python3.9/site-packages/numpy/_core/fromnumeric.py(3063)_prod_dispatcher()
Where the expected behavior would be to be able to work at the level of test_my_function
in the debugger, but I’m being brought into the numpy
package.
Anyone know why this could be happening?