def _do_test_callback(self, _): slash.add_cleanup(self._regular_cleanup) slash.add_critical_cleanup(self._critical_cleanup) raise KeyboardInterrupt()
def tempdir(): d = tempfile.mkdtemp() slash.add_critical_cleanup(partial(shutil.rmtree, d)) return d