Please consider merging this change.
I had issues with skipped tests. In my use case, I have a fixture function that delivers a lot of test files but skips execution if some external resource is not available.
That caused a flurry of messages because of logging to a closed TextIO instance.
Without much insight I patched pytest-capturelog close to the point where the logger was created but never destroyed. The callback was only run with call.when='setup' and call.when='teardown'.