.beb and .json serialization of the document

This commit is contained in:
2026-07-23 14:25:22 +02:00
parent 7e99669b31
commit 65d6012c7f
8 changed files with 721 additions and 0 deletions

37
tests/conftest.py Normal file
View File

@@ -0,0 +1,37 @@
"""Shared pytest fixtures for bedit tests.
Qt-specific fixtures can be added here later when GUI testing starts. Keeping
the model fixtures independent from Qt lets the core suite stay lightweight.
"""
from __future__ import annotations
import pytest
from bedit_core.models import (
Component,
ComponentID,
Document,
Graph,
GraphImplementation,
ID,
Interface,
)
@pytest.fixture
def minimal_document() -> Document:
"""Return the smallest useful graph document for core tests."""
root_id = ComponentID("root")
root = Component(
name="Root",
interface=Interface(),
parameters={},
implementation=GraphImplementation(Graph()),
)
return Document(
format_version=1,
id=ID("document"),
name="Test document",
root={root_id: root},
)