Files
thechart/scripts/test_simple.py
William Valentin c755f0affc Add comprehensive tests for dose tracking functionality
- Implemented `test_dose_parsing_simple.py` to validate the dose parsing workflow.
- Created `test_dose_save.py` to verify the saving functionality of dose tracking.
- Added `test_dose_save_simple.py` for programmatic testing of dose saving without UI interaction.
- Developed `test_final_workflow.py` to test the complete dose tracking workflow, ensuring doses are preserved during edits.
- Enhanced `conftest.py` with a mock pathology manager for testing.
- Updated `test_data_manager.py` to include pathology manager in DataManager tests and ensure compatibility with new features.
2025-07-31 09:50:45 -07:00

35 lines
929 B
Python

#!/usr/bin/env python3
"""Simple test of the dynamic pathology system."""
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "src"))
from medicine_manager import MedicineManager
from pathology_manager import PathologyManager
def main():
print("Testing dynamic pathology and medicine system...")
# Test pathology manager
pm = PathologyManager()
pathologies = pm.get_all_pathologies()
print(f"✅ Loaded {len(pathologies)} pathologies:")
for key, pathology in pathologies.items():
print(f" {key}: {pathology.display_name}")
# Test medicine manager
mm = MedicineManager()
medicines = mm.get_all_medicines()
print(f"✅ Loaded {len(medicines)} medicines:")
for key, medicine in medicines.items():
print(f" {key}: {medicine.display_name}")
print("🎉 Dynamic system working perfectly!")
if __name__ == "__main__":
main()