Hands on: Debugging find_maxima #2

Open
opened 2024-08-26 22:38:11 +02:00 by pamela · 0 comments
Owner

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, so that the tests pass.

Setup

  • Go to the directory hands_on/local_maxima_part3_debug.
  • Run local_maxima.py file.
  • Run test_local_maxima.py file using pytest.

What to do

  • Pick a test to fix (feel free to skip to a test where you cannot immediately see what the fix will be). Sometimes there is more information about what you need to fix in the comment in the test.
  • 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
  • Submit a PR for this issue
  • Repeat
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, so that the tests pass. **Setup** - Go to the directory hands_on/local_maxima_part3_debug. - Run local_maxima.py file. - Run test_local_maxima.py file using pytest. **What to do** - Pick a test to fix (feel free to skip to a test where you cannot immediately see what the fix will be). Sometimes there is more information about what you need to fix in the comment in the test. - 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 - Submit a PR for this issue - Repeat
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ASPP/2024-heraklion-testing-debugging#2
No description provided.