-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsimple_test.py
More file actions
61 lines (46 loc) · 1.49 KB
/
Copy pathsimple_test.py
File metadata and controls
61 lines (46 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Test đơn giản để kiểm tra import modules.
"""
def test_core_imports():
"""Test import các module core."""
try:
from quangtps.core import exceptions
print("✓ Core exceptions: OK")
except Exception as e:
print(f"✗ Core exceptions: {e}")
try:
from quangtps.optimization.objectives import (
ObjectiveType,
ObjectiveBase,
ObjectiveCollection,
)
print("✓ Objectives: OK")
except Exception as e:
print(f"✗ Objectives: {e}")
try:
from quangtps.dose.dose_engine import DoseEngine
print("✓ Dose engine: OK")
except Exception as e:
print(f"✗ Dose engine: {e}")
try:
from quangtps.optimization.optimizers import OptimizerFactory
print("✓ Optimizers: OK")
except Exception as e:
print(f"✗ Optimizers: {e}")
def test_algorithm_creation():
"""Test tạo algorithms."""
try:
from quangtps.dose.algorithms.pencil_beam import PencilBeamAlgorithm
algorithm = PencilBeamAlgorithm()
print(f"✓ PencilBeam created: {algorithm.name}")
except Exception as e:
print(f"✗ PencilBeam creation: {e}")
if __name__ == "__main__":
print("=== SIMPLE QUANGTPS TEST ===")
print("\n--- Core Imports ---")
test_core_imports()
print("\n--- Algorithm Creation ---")
test_algorithm_creation()
print("\n=== TEST COMPLETE ===")