def test_should_check_that_sphinx_can_be_executed(self, mock_assert_can_execute):
        mock_logger = Mock(Logger)

        assert_sphinx_is_available(mock_logger)

        expected_command_line = ['sphinx-build', '--version']
        mock_assert_can_execute.assert_called_with(
            expected_command_line, 'sphinx', 'plugin python.sphinx')
Example #2
0
    def test_should_check_that_sphinx_can_be_executed(self,
                                                      mock_assert_can_execute):
        mock_logger = Mock(Logger)

        assert_sphinx_is_available(mock_logger)

        expected_command_line = ['sphinx-build', '--version']
        mock_assert_can_execute.assert_called_with(expected_command_line,
                                                   'sphinx',
                                                   'plugin python.sphinx')
Example #3
0
    def test_should_check_that_sphinx_can_be_executed(self, mock_assert_can_execute):
        mock_logger = Mock(Logger)

        assert_sphinx_is_available(mock_logger)

        mock_assert_can_execute.assert_has_calls(
            [
                call(['sphinx-build', '--version'], 'sphinx', 'plugin python.sphinx'),
                call(['sphinx-apidoc', '--version'], 'sphinx', 'plugin python.sphinx')
            ]
        )
Example #4
0
    def test_should_check_that_sphinx_can_be_executed(self,
                                                      mock_assert_can_execute):
        mock_logger = Mock(Logger)

        assert_sphinx_is_available(mock_logger)

        mock_assert_can_execute.assert_has_calls([
            call(['sphinx-build', '--version'], 'sphinx',
                 'plugin python.sphinx'),
            call(['sphinx-apidoc', '--version'], 'sphinx',
                 'plugin python.sphinx')
        ])
    def test_should_check_that_sphinx_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

        assert_sphinx_is_available(mock_project, mock_logger, reactor)

        pyb_env.verify_can_execute.assert_has_calls([
            call(["sphinx-build", "--version"], "sphinx-build",
                 "plugin python.sphinx"),
            call(["sphinx-apidoc", "--version"], "sphinx-apidoc",
                 "plugin python.sphinx")
        ])