In both, the addCleanup below this line ensures it gets dropped after the test (acts as a finally whereas tearDown only gets called if the test exited normally.)