コード例 #1
0
ファイル: test_interruptions.py プロジェクト: rechtere/slash
 def _do_test_callback(self, _):
     slash.add_cleanup(self._regular_cleanup)
     slash.add_critical_cleanup(self._critical_cleanup)
     raise KeyboardInterrupt()
コード例 #2
0
ファイル: slashconf.py プロジェクト: getslash/scotty
def tempdir():
    d = tempfile.mkdtemp()
    slash.add_critical_cleanup(partial(shutil.rmtree, d))
    return d
コード例 #3
0
 def _do_test_callback(self, _):
     slash.add_cleanup(self._regular_cleanup)
     slash.add_critical_cleanup(self._critical_cleanup)
     raise KeyboardInterrupt()