from __future__ import annotations

from eightmem.core.context_export import compile_context
from eightmem.core.paths import memory_dir
from eightmem.core.templates import copy_default_templates


def test_export_context_compiles(fake_home):
    mem = memory_dir()
    mem.mkdir(parents=True, exist_ok=True)
    copy_default_templates(mem)

    context = compile_context(mem)
    assert "# 8mem Context Export" in context
    assert "## IDENTITY" in context
