Issue #2: Debugging find_maxima #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This time you are given an (incomplete) implementation of a find_maxima function and some tests (5 test cases you encountered before, 8 new test cases which fail).
Your task is now to work with the tests and the debugger to find out what is going wrong using the pdb debugger and fix the implementation of the find_maxima function.
Go to the directory hands_on/local_maxima_part3_debug.
Run local_maxima.py file to make sure it is working.
Run test_local_maxima.py file using pytest.
Pick a test to fix (you may skip to a test where you cannot immediately see what the fix will be).
Run one test with pdb and pytest, e.g.:
pytest hands_on/local_maxima_part3_debug/test_local_maxima.py::test_find_maxima_correct_order
Pdb will stop whereever you add a
breakpoint()
Find out what is happening and where it is going wrong using the debugger
Edit the find_maxima function to address the problem you found & run the test to check if your edits are successful
Create a branch and submit a PR for this issue