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>
This commit is contained in:
39
tests/test_env_integration.py
Normal file
39
tests/test_env_integration.py
Normal file
@@ -0,0 +1,39 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user