How to Unit Test a Nested Function Using PyTest Without Modifying the Outer Function
I have a Python function that contains a nested function. I want to write unit tests for the nested function using PyTest, but I don’t want to modify the way the nested function is defined or its behavior. I also don’t want to call or test the outer function itself, just the nested function.