Beispiel #1
0
    def test_is_tool_returns_false_if_exec_not_installed(self, mock_popen):
        e = OSError(errno.ENOENT, 'msg')
        mock_popen.side_effect = e

        output = is_tool('a')

        args, kwargs = mock_popen.call_args
        self.assertEqual(args[0], ['a'])
        self.assertFalse(output)
Beispiel #2
0
    def test_is_tool_returns_false_if_exec_not_installed(self, mock_popen):
        e = OSError(errno.ENOENT, 'msg')
        mock_popen.side_effect = e

        output = is_tool('a')

        args, kwargs = mock_popen.call_args
        self.assertEqual(args[0], ['a'])
        self.assertFalse(output)
Beispiel #3
0
    def test_is_tool_returns_true_if_installed(self, mock_popen):
        output = is_tool('a')

        args, kwargs = mock_popen.call_args
        self.assertEqual(args[0], ['a'])
        self.assertTrue(output)
Beispiel #4
0
    def test_is_tool_returns_true_if_installed(self, mock_popen):
        output = is_tool('a')

        args, kwargs = mock_popen.call_args
        self.assertEqual(args[0], ['a'])
        self.assertTrue(output)