Files
Atomizer/tests/conftest.py
Anto01 7bdb74f93b refactor: Reorganize code structure and create tests directory
- Consolidate surrogates module to processors/surrogates/
- Move ensemble_surrogate.py to proper location
- Add deprecation shim for old import path
- Create tests/ directory with pytest structure
- Move test files from archive/test_scripts/
- Add conftest.py with shared fixtures

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 09:01:37 -05:00

33 lines
834 B
Python

"""
Pytest configuration and shared fixtures for Atomizer tests.
"""
import pytest
import sys
from pathlib import Path
# Add project root to path
sys.path.insert(0, str(Path(__file__).parent.parent))
@pytest.fixture
def sample_study_dir(tmp_path):
"""Create a temporary study directory structure."""
study = tmp_path / "test_study"
(study / "1_setup").mkdir(parents=True)
(study / "2_iterations").mkdir()
(study / "3_results").mkdir()
return study
@pytest.fixture
def sample_config():
"""Sample optimization config for testing."""
return {
"study_name": "test_study",
"design_variables": [
{"name": "param1", "lower": 0, "upper": 10, "type": "continuous"}
],
"objectives": [
{"name": "minimize_mass", "direction": "minimize"}
]
}