Ejemplo n.º 1
0
    def test_should_check_that_pylint_can_be_executed(self, mock_assert_can_execute):

        mock_logger = Mock(Logger)

        check_pep8_available(mock_logger)

        expected_command_line = ('pep8',)
        mock_assert_can_execute.assert_called_with(expected_command_line, 'pep8', 'plugin python.pep8')
Ejemplo n.º 2
0
    def test_should_check_that_pylint_can_be_executed(self, mock_assert_can_execute):

        mock_logger = Mock(Logger)

        check_pep8_available(mock_logger)

        expected_command_line = ('pep8',)
        mock_assert_can_execute.assert_called_with(expected_command_line, 'pep8', 'plugin python.pep8')
Ejemplo n.º 3
0
    def test_should_check_that_pylint_can_be_executed(self):
        mock_project = Mock(Project)
        mock_logger = Mock(Logger)

        reactor = Mock()
        pyb_env = Mock()
        reactor.python_env_registry = {"pybuilder": pyb_env}
        reactor.pybuilder_venv = pyb_env

        check_pep8_available(mock_project, mock_logger, reactor)

        expected_command_line = ['pep8', ]
        pyb_env.verify_can_execute.assert_called_with(expected_command_line, 'pep8', 'plugin python.pep8')