Skip to content

Commit

Permalink
test: refactor test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Jan 15, 2024
1 parent 94fee75 commit cee4782
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ keywords = ["mdformat", "markdown", "markdown-it"]
requires-python = ">=3.8.4"
dependencies = [
"mdformat >= 0.7.16",
"mdformat-admon >= 2.0.0rc1",
"mdformat-admon >= 2.0.0",
# "mdformat-gfm >= 0.3.6", # TODO: PENDING RELEASE (https://github.com/hukkin/mdformat-gfm/issues/31)
"mdformat-gfm @ git+https://github.com/hukkin/mdformat-gfm.git",
]
Expand Down
Empty file added tests/format/__init__.py
Empty file.
Empty file added tests/format/fixtures.md
Empty file.
2 changes: 1 addition & 1 deletion tests/test_fixtures.py → tests/format/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from markdown_it.utils import read_fixture_file

from .helpers import print_text
from ..helpers import print_text

FIXTURE_PATH = Path(__file__).parent / "fixtures.md"
fixtures = read_fixture_file(FIXTURE_PATH)
Expand Down
Empty file added tests/render/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions tests/test_render.py → tests/render/test_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

from mdformat_mkdocs.plugins import content_tabs_plugin, mkdocs_admon_plugin

from .helpers import print_text
from ..helpers import print_text

FIXTURE_PATH = Path(__file__).parent
FIXTURE_PATH = Path(__file__).parent / "fixtures"


def with_plugin(filename, plugins):
Expand All @@ -18,9 +18,9 @@ def with_plugin(filename, plugins):
@pytest.mark.parametrize(
("line", "title", "text", "expected", "plugins"),
[
*with_plugin("fixtures-admon-mkdocs.md", [mkdocs_admon_plugin]),
*with_plugin("admonitions.md", [mkdocs_admon_plugin]),
*with_plugin(
"fixtures-mkdocs-content-tabs.md",
"content-tabs.md",
[mkdocs_admon_plugin, content_tabs_plugin],
),
],
Expand Down

0 comments on commit cee4782

Please sign in to comment.