Create tests using pytest with coverage for edge cases.
Write a complete pytest unit test for the given function. Include edge case testing and fixture if necessary.