コード例 #1
0
ファイル: store.py プロジェクト: pombreda/gofer
 def delete(self):
     """
     Drain the queue and delete the store.
     """
     self.is_open = False
     self.thread.abort()
     self.thread.join()
     self._drain()
     path = os.path.join(Pending.PENDING, self.stream)
     rmdir(path)
     log.info('%s, deleted', path)
コード例 #2
0
 def delete(self):
     """
     Drain the queue and delete the store.
     """
     self.is_open = False
     self.thread.abort()
     self.thread.join()
     self._drain()
     path = os.path.join(Pending.PENDING, self.stream)
     rmdir(path)
     log.info('%s, deleted', path)
コード例 #3
0
ファイル: test_common.py プロジェクト: pombreda/gofer
 def test_not_exist(self, _rmdir):
     path = '/tmp/dir'
     exception = OSError()
     exception.errno = errno.ENOENT
     _rmdir.side_effect = exception
     rmdir(path)
コード例 #4
0
ファイル: test_common.py プロジェクト: pombreda/gofer
 def test_rm(self, _rmdir):
     path = '/tmp/dir'
     rmdir(path)
     _rmdir.assert_called_once_with(path)
コード例 #5
0
ファイル: test_common.py プロジェクト: credativ/gofer
 def test_not_exist(self, _rmdir):
     path = '/tmp/dir'
     exception = OSError()
     exception.errno = errno.ENOENT
     _rmdir.side_effect = exception
     rmdir(path)
コード例 #6
0
ファイル: test_common.py プロジェクト: credativ/gofer
 def test_rm(self, _rmdir):
     path = '/tmp/dir'
     rmdir(path)
     _rmdir.assert_called_once_with(path)