Take 2: It took a while to track down which tests were leaving around .tmp* directories and files in the TEMPDIR after the test suite was run, but it appears that this resolves them all across normal and 'ignored' tests.
In short, if there are any open files/dirs remaining when TempDir is scoped out, a deletion is silently omitted. This code more explicitly cleans up some temporary artifacts in order to ensure everything is removed and closed before that happens.
Take 2: It took a while to track down which tests were leaving around .tmp* directories and files in the TEMPDIR after the test suite was run, but it appears that this resolves them all across normal and 'ignored' tests.
In short, if there are any open files/dirs remaining when TempDir is scoped out, a deletion is silently omitted. This code more explicitly cleans up some temporary artifacts in order to ensure everything is removed and closed before that happens.