Files
phyllomeos/tests/integration/conftest.py
T
Lukas Greve 31955a8983 refactor: rename fragments directory to ingredients and update all references
- Directory rename: fragments/ → ingredients/ (54 .ks files)
- Updated all Python scripts:
  * tests/integration/conftest.py - fixture renames
  * tests/integration/test_integration.py - constant and path updates
  * tests/test_recipe_generator.py - updated test assertions
  * recipe-generator/validators.py - updated comments and error messages
  * recipe-generator/recipe_generator.py - updated comment
- Updated all YAML files:
  * recipe-generator/recipe_templates.yaml - 66 path references
  * .gitea/workflows/validate-fragments.yaml → validate-ingredients.yaml
  * .gitea/workflows/test-generation.yaml - path patterns
- Updated scripts:
  * bin/ksflatten-relative - updated path detection
- Updated test file:
  * tests/integration/test_fragments.py → test_ingredients.py
- Updated documentation:
  * DEVELOPMENT.md - simplified references
  * DEVELOPMENT_QUICK.md - updated examples
  * tests/container/README.md - test references
- Regenerated all recipes (16 files) with ingredient paths
- Updated test fixtures (7 files)
- All integration tests pass (5/5)
- All unit tests pass (29/31 - 2 pre-existing failures unrelated)
2026-03-26 20:27:56 +01:00

51 lines
1.3 KiB
Python

"""Pytest fixtures and shared utilities for Phyllome OS integration tests."""
import pytest
from pathlib import Path
import sys
# Find project root (3 levels up from integration tests)
PROJECT_ROOT = Path(__file__).resolve().parent.parent.parent
SCRIPTS_DIR = PROJECT_ROOT / 'recipe-generator'
sys.path.insert(0, str(SCRIPTS_DIR))
@pytest.fixture
def generator():
"""Create RecipeGenerator instance."""
from recipe_generator import RecipeGenerator
templates_file = PROJECT_ROOT / 'recipe-generator' / 'recipe_templates.yaml'
return RecipeGenerator(templates_file)
@pytest.fixture
def project_root():
"""Return project root directory."""
return PROJECT_ROOT
@pytest.fixture
def ingredients_dir(project_root):
"""Return ingredients directory."""
return project_root / 'ingredients'
@pytest.fixture
def recipes_dir(project_root):
"""Return recipes directory."""
return project_root / 'recipes'
@pytest.fixture
def ingredients(ingredients_dir):
"""List all .ks ingredient files."""
return list(ingredients_dir.glob('**/*.ks'))
@pytest.fixture
def expected_recipes_dir(project_root):
"""Return expected recipes directory for golden masters."""
return project_root / 'tests' / 'fixtures' / 'expected_recipes'