def test_edit_config_with_windows_exec(self): with _common.system_mock('Windows'): with patch('os.execlp') as execlp: self.run_command('config', '-e') execlp.assert_called_once_with(self.config_path, self.config_path)
def test_edit_config_with_xdg_open(self): with _common.system_mock('Linux'): with patch('os.execlp') as execlp: self.run_command('config', '-e') execlp.assert_called_once_with( 'xdg-open', 'xdg-open', self.config_path)
def test_edit_config_with_windows_exec(self): self.execlp_stub() with _common.system_mock('Windows'): ui._raw_main(['config', '-e']) self.assertEqual(self._execlp_call, [self.config_path])
def test_edit_config_with_xdg_open(self): self.execlp_stub() with _common.system_mock('Linux'): ui._raw_main(['config', '-e']) self.assertEqual(self._execlp_call, ['xdg-open', self.config_path])