Files
macro_split/tests/test_env_integration.py
hotwa 68f171ad1d Add splicing module and related tests
- Add src/splicing/ module with scaffold_prep, fragment_prep, and engine
- Add tylosin_splicer.py entry script
- Add unit tests for splicing components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 17:47:00 +08:00

40 lines
1.2 KiB
Python

import sys
import os
from pathlib import Path
# Add SIME to path
SIME_PATH = "/home/zly/project/SIME"
if SIME_PATH not in sys.path:
sys.path.append(SIME_PATH)
# Add project root to path so we can import 'src'
PROJECT_ROOT = str(Path(__file__).parent.parent)
if PROJECT_ROOT not in sys.path:
sys.path.append(PROJECT_ROOT)
def test_imports():
"""Verify that we can import from both local project and SIME."""
print(f"sys.path: {sys.path}")
# 1. Test local import from src
try:
# Correct function name based on file inspection
from src.ring_numbering import assign_ring_numbering
assert callable(assign_ring_numbering)
print("Successfully imported src.ring_numbering.assign_ring_numbering")
except ImportError as e:
print(f"Failed to import src.ring_numbering: {e}")
raise
# 2. Test SIME import
try:
from utils.mole_predictor import ParallelBroadSpectrumPredictor
assert ParallelBroadSpectrumPredictor is not None
print("Successfully imported ParallelBroadSpectrumPredictor from utils.mole_predictor")
except ImportError as e:
print(f"Failed to import from SIME: {e}")
raise
if __name__ == "__main__":
test_imports()