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