Code reference
https://github.com/LambdaSchool/Sorting/blob/c273860239b5147fb1a65d8f27ccc31eb032723d/src/recursive_sorting/test_recursive.py#L21-L31
Bug
In-place sorting means that the initially passed in array will be modified, and does not need to be re-assigned.
If the merge_sort_in_place() function creates a new array and returns it without modifying the original, this test should fail. Currently, it does not.
Fix
Call the merge_sort_in_place() function before testing, and then assertEqual() the array itself to the expected value. This should test whether the array was truly modified in place.
Fixed in PR #288 .
Code reference
https://github.com/LambdaSchool/Sorting/blob/c273860239b5147fb1a65d8f27ccc31eb032723d/src/recursive_sorting/test_recursive.py#L21-L31
Bug
In-place sorting means that the initially passed in array will be modified, and does not need to be re-assigned.
If the
merge_sort_in_place()function creates a new array and returns it without modifying the original, this test should fail. Currently, it does not.Fix
Call the
merge_sort_in_place()function before testing, and thenassertEqual()the array itself to the expected value. This should test whether the array was truly modified in place.Fixed in PR #288 .