Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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)
Beispiel #4
0
 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])