Merge "Mocking ansible module in the documentation config"

This commit is contained in:
Zuul 2023-02-28 13:15:09 +00:00 committed by Gerrit Code Review
commit 9960993bae

View File

@ -15,6 +15,7 @@
import os
import sys
from unittest import mock
# Add the project
sys.path.insert(0, os.path.abspath('../..'))
@ -36,6 +37,10 @@ extensions = [
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
# Mocking imports that could cause build failure
autodoc_mock_imports = ['ansible']
sys.modules['ansible.module_utils.basic'] = mock.Mock()
# The suffix of source filenames.
source_suffix = '.rst'