diff --git a/pyproject.toml b/pyproject.toml index 1f9440f9..ebfb8377 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,6 +148,7 @@ filterwarnings = [ "ignore:.*The default for the setting.*:FutureWarning", "ignore:.*:PendingDeprecationWarning", ] +addopts = "--import-mode=importlib" [tool.coverage.run] omit = ["*/_docs.py"] diff --git a/tests/test_renderers/test_fixtures_docutils.py b/tests/test_renderers/test_fixtures_docutils.py index c46e51c7..37954792 100644 --- a/tests/test_renderers/test_fixtures_docutils.py +++ b/tests/test_renderers/test_fixtures_docutils.py @@ -11,12 +11,12 @@ from typing import Any import pytest -from conftest import normalize_doctree_xml from docutils import __version_info__ as docutils_version from docutils.core import Publisher, publish_doctree from pytest_param_files import ParamTestData from myst_parser.parsers.docutils_ import Parser +from tests.conftest import normalize_doctree_xml FIXTURE_PATH = Path(__file__).parent.joinpath("fixtures") diff --git a/tests/test_renderers/test_include_directive.py b/tests/test_renderers/test_include_directive.py index e7065747..430b967b 100644 --- a/tests/test_renderers/test_include_directive.py +++ b/tests/test_renderers/test_include_directive.py @@ -3,10 +3,10 @@ from pathlib import Path import pytest -from conftest import normalize_doctree_xml from docutils.core import publish_doctree from myst_parser.parsers.docutils_ import Parser +from tests.conftest import normalize_doctree_xml FIXTURE_PATH = Path(__file__).parent.joinpath("fixtures") diff --git a/tests/test_renderers/test_myst_config.py b/tests/test_renderers/test_myst_config.py index 9a276cce..7833c1e1 100644 --- a/tests/test_renderers/test_myst_config.py +++ b/tests/test_renderers/test_myst_config.py @@ -5,12 +5,12 @@ from pathlib import Path import pytest -from conftest import normalize_doctree_xml from docutils import __version_info__ as docutils_version from docutils.core import Publisher, publish_string from pytest_param_files import ParamTestData from myst_parser.parsers.docutils_ import Parser +from tests.conftest import normalize_doctree_xml FIXTURE_PATH = Path(__file__).parent.joinpath("fixtures") INV_PATH = Path(__file__).parent.parent.absolute() / "static" / "objects_v2.inv" diff --git a/tests/test_renderers/test_myst_refs.py b/tests/test_renderers/test_myst_refs.py index fcdfd619..af8757be 100644 --- a/tests/test_renderers/test_myst_refs.py +++ b/tests/test_renderers/test_myst_refs.py @@ -1,10 +1,11 @@ import sys import pytest -from conftest import normalize_doctree_xml from sphinx.util.console import strip_colors from sphinx_pytest.plugin import CreateDoctree +from tests.conftest import normalize_doctree_xml + @pytest.mark.parametrize( "test_name,text,should_warn",