def CloseBuffersForFilename_test( vim_command, *args ): vimsupport.CloseBuffersForFilename( 'some_filename' ) vim_command.assert_has_exact_calls( [ call( 'silent! bwipeout! 2' ), call( 'silent! bwipeout! 5' ) ], any_order = True )
def CloseBuffersForFilename_test(vim_command): buffers = [{ 'number': 2, 'filename': os.path.realpath('some_filename'), }, { 'number': 5, 'filename': os.path.realpath('some_filename'), }, { 'number': 1, 'filename': os.path.realpath('another_filename') }] with patch('vim.buffers', buffers): vimsupport.CloseBuffersForFilename('some_filename') vim_command.assert_has_exact_calls( [call('silent! bwipeout! 2'), call('silent! bwipeout! 5')], any_order=True)
def _CloseLogfile(self, logfile): vimsupport.CloseBuffersForFilename(logfile)
def _CloseLogs(self, stdout=True, stderr=True): if stdout: vimsupport.CloseBuffersForFilename(self._server_stdout) if stderr: vimsupport.CloseBuffersForFilename(self._server_stderr)