1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
import os
import sys
from dataclasses import dataclass, field
import pytest
from mkdocs_include_markdown_plugin.config import PluginConfig
parametrize_directives = pytest.mark.parametrize(
'directive',
('include', 'include-markdown'),
ids=('directive=include', 'directive=include-markdown'),
)
unix_only = pytest.mark.skipif(
sys.platform.startswith('win'),
reason='Test only supported on Unix systems',
)
windows_only = pytest.mark.skipif(
not sys.platform.startswith('win'),
reason='Test only supported on Windows systems',
)
rootdir = os.path.join(os.path.dirname(__file__), '..')
@dataclass
class FakeConfig:
cache: int = PluginConfig.cache.default
cache_dir: str = PluginConfig.cache_dir.default
directives: dict[str, str] = field(
default_factory=lambda: PluginConfig.directives.default,
)
order: str = PluginConfig.order.default
|