Initial commit
Some checks failed
CI / test (push) Failing after 11s
CI / image (push) Has been skipped

This commit is contained in:
2026-08-01 21:03:35 -04:00
commit 8b5cd370ea
41 changed files with 5462 additions and 0 deletions

32
tests/conftest.py Normal file
View File

@@ -0,0 +1,32 @@
from __future__ import annotations
import shutil
from pathlib import Path
import pytest
from mdcaldav.config import Config
from mdcaldav.parser import parse_file
FIXTURE_VAULT = Path(__file__).parent / "fixtures" / "vault"
@pytest.fixture
def cfg() -> Config:
return Config()
@pytest.fixture
def vault(tmp_path: Path) -> Path:
"""A writable copy of the real note fixtures."""
dest = tmp_path / "vault"
shutil.copytree(FIXTURE_VAULT, dest)
return dest
@pytest.fixture
def tasks_of(cfg: Config):
def _load(vault: Path, rel: str):
return parse_file(vault / rel, rel, cfg)
return _load