-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathtest_imports.py
More file actions
45 lines (39 loc) · 1.23 KB
/
test_imports.py
File metadata and controls
45 lines (39 loc) · 1.23 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
"""
Test script to verify that the core components of vpplib can be imported.
"""
try:
print("Importing Component...")
from vpplib.component import Component
print("Success!")
except Exception as e:
print(f"Failed to import Component: {e}")
try:
print("\nImporting HeatPump...")
from vpplib.heat_pump import HeatPump
print("Success!")
except Exception as e:
print(f"Failed to import HeatPump: {e}")
try:
print("\nImporting Photovoltaic...")
from vpplib.photovoltaic import Photovoltaic
print("Success!")
except Exception as e:
print(f"Failed to import Photovoltaic: {e}")
try:
print("\nImporting WindPower...")
from vpplib.wind_power import WindPower
print("Success!")
except Exception as e:
print(f"Failed to import WindPower: {e}")
try:
print("\nImporting ElectricalEnergyStorage...")
from vpplib.electrical_energy_storage import ElectricalEnergyStorage
print("Success!")
except Exception as e:
print(f"Failed to import ElectricalEnergyStorage: {e}")
try:
print("\nImporting PySAMBatteryStateful...")
from vpplib.electrical_energy_storage import PySAMBatteryStateful
print("Success!")
except Exception as e:
print(f"Failed to import PySAMBatteryStateful: {e}")