mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Explicitly remove the `autodoc_fodder
` module
This commit is contained in:
parent
f195c4ae87
commit
6fab64fb55
@ -177,4 +177,3 @@ def _clean_up_global_state() -> None:
|
|||||||
|
|
||||||
# clean up autodoc global state
|
# clean up autodoc global state
|
||||||
sphinx.pycode.ModuleAnalyzer.cache.clear()
|
sphinx.pycode.ModuleAnalyzer.cache.clear()
|
||||||
sys.modules.pop('autodoc_fodder', None)
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
import os
|
import os
|
||||||
import posixpath
|
import posixpath
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
@ -80,6 +81,7 @@ def test_html_warnings(app, warning):
|
|||||||
+ f'--- Expected (regex):\n{warnings_exp}\n'
|
+ f'--- Expected (regex):\n{warnings_exp}\n'
|
||||||
+ f'--- Got:\n{warnings}'
|
+ f'--- Got:\n{warnings}'
|
||||||
)
|
)
|
||||||
|
sys.modules.pop('autodoc_fodder', None)
|
||||||
|
|
||||||
|
|
||||||
def test_html4_error(make_app, tmp_path):
|
def test_html4_error(make_app, tmp_path):
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
from itertools import chain, product
|
from itertools import chain, product
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
@ -183,6 +184,7 @@ def test_latex_warnings(app, status, warning):
|
|||||||
+ f'--- Expected (regex):\n{warnings_exp}\n'
|
+ f'--- Expected (regex):\n{warnings_exp}\n'
|
||||||
+ f'--- Got:\n{warnings}'
|
+ f'--- Got:\n{warnings}'
|
||||||
)
|
)
|
||||||
|
sys.modules.pop('autodoc_fodder', None)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.sphinx('latex', testroot='basic')
|
@pytest.mark.sphinx('latex', testroot='basic')
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from subprocess import CalledProcessError
|
from subprocess import CalledProcessError
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
@ -36,6 +37,7 @@ def test_texinfo_warnings(app, status, warning):
|
|||||||
+ f'--- Expected (regex):\n{warnings_exp}\n'
|
+ f'--- Expected (regex):\n{warnings_exp}\n'
|
||||||
+ f'--- Got:\n{warnings}'
|
+ f'--- Got:\n{warnings}'
|
||||||
)
|
)
|
||||||
|
sys.modules.pop('autodoc_fodder', None)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.sphinx('texinfo')
|
@pytest.mark.sphinx('texinfo')
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
"""Test the Builder class."""
|
"""Test the Builder class."""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
@ -37,3 +40,5 @@ def test_incremental_reading_for_missing_files(app):
|
|||||||
# "index" is listed up to updated because it contains references
|
# "index" is listed up to updated because it contains references
|
||||||
# to nonexisting downloadable or image files
|
# to nonexisting downloadable or image files
|
||||||
assert set(updated) == {'index'}
|
assert set(updated) == {'index'}
|
||||||
|
|
||||||
|
sys.modules.pop('autodoc_fodder', None)
|
||||||
|
Loading…
Reference in New Issue
Block a user