Skip to content

Commit 4ffb6c9

Browse files
committed
tests: Fix tests
Issue #5: #5
1 parent 8b9f547 commit 4ffb6c9

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

config/pytest.ini

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,3 @@ addopts =
1414
--cov-config config/coverage.ini
1515
testpaths =
1616
tests
17-
18-
# action:message_regex:warning_class:module_regex:line
19-
filterwarnings =
20-
error
21-
# TODO: remove once pytest-xdist 4 is released
22-
ignore:.*rsyncdir:DeprecationWarning:xdist

tests/conftest.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@
44

55
import pytest
66
from markdown.core import Markdown
7-
from mkdocs import config
8-
9-
try:
10-
from mkdocs.config.defaults import get_schema
11-
except ImportError:
12-
13-
def get_schema(): # noqa: WPS440
14-
"""Fallback for old versions of MkDocs.""" # noqa: DAR201
15-
return config.DEFAULT_SCHEMA
7+
from mkdocs.config.defaults import MkDocsConfig
168

179

1810
@pytest.fixture(name="mkdocs_conf")
@@ -26,7 +18,7 @@ def fixture_mkdocs_conf(request, tmp_path):
2618
Yields:
2719
MkDocs configuration object.
2820
"""
29-
conf = config.Config(schema=get_schema())
21+
conf = MkDocsConfig()
3022
while hasattr(request, "_parent_request") and hasattr(request._parent_request, "_parent_request"): # noqa: WPS437
3123
request = request._parent_request # noqa: WPS437
3224

tests/test_themes.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@
2020
"mkdocstrings.extension",
2121
"mkdocstrings.inventory",
2222
"mkdocstrings.loggers",
23-
"mkdocstrings.plugin",
2423
"mkdocstrings.handlers.base",
2524
"mkdocstrings.handlers.rendering",
2625
"mkdocstrings_handlers.python.handler",
2726
"mkdocstrings_handlers.python.rendering",
2827
],
2928
)
30-
@pytest.mark.skipif(sys.version_info < (3, 7), reason="material is not installed on Python 3.6")
3129
def test_render_themes_templates(module, plugin):
3230
"""Test rendering of a given theme's templates.
3331

0 commit comments

Comments
 (0)