File tree Expand file tree Collapse file tree
climada/trajectories/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727from scipy .sparse import csr_matrix
2828
2929from climada .trajectories .interpolation import (
30- ExponentialInterpolation ,
31- LinearInterpolation ,
30+ AllLinearInterpolation ,
31+ ExponentialExposureInterpolation ,
3232)
3333
3434
@@ -42,7 +42,7 @@ def setUp(self):
4242 self .time_points = 5
4343
4444 # Create an instance of LinearInterpolation
45- self .linear_interpolation = LinearInterpolation ()
45+ self .linear_interpolation = AllLinearInterpolation ()
4646
4747 def test_interpolate (self ):
4848 result = self .linear_interpolation .interpolate (
@@ -84,7 +84,7 @@ def setUp(self):
8484 self .time_points = 5
8585
8686 # Create an instance of ExponentialInterpolation
87- self .exponential_interpolation = ExponentialInterpolation ()
87+ self .exponential_interpolation = ExponentialExposureInterpolation ()
8888
8989 def test_interpolate (self ):
9090 result = self .exponential_interpolation .interpolate (
Original file line number Diff line number Diff line change 3939
4040# Import the CalcRiskPeriod class and other necessary classes/functions
4141from climada .trajectories .riskperiod import (
42+ AllLinearInterpolation ,
4243 CalcRiskPeriod ,
4344 ImpactCalcComputation ,
4445 ImpactComputationStrategy ,
4546 InterpolationStrategy ,
46- LinearInterpolation ,
4747 Snapshot ,
4848)
4949from climada .util .constants import EXP_DEMO_H5 , HAZ_DEMO_H5
@@ -115,7 +115,7 @@ def setUp(self):
115115 self .mock_snapshot0 ,
116116 self .mock_snapshot1 ,
117117 interval_freq = "AS-JAN" ,
118- interpolation_strategy = LinearInterpolation (),
118+ interpolation_strategy = AllLinearInterpolation (),
119119 impact_computation_strategy = ImpactCalcComputation (),
120120 # These will have to be tested when implemented
121121 # risk_transf_attach=0.1,
@@ -131,7 +131,7 @@ def test_init(self):
131131 self .calc_risk_period .time_points , self .future_date - self .present_date + 1
132132 )
133133 self .assertIsInstance (
134- self .calc_risk_period .interpolation_strategy , LinearInterpolation
134+ self .calc_risk_period .interpolation_strategy , AllLinearInterpolation
135135 )
136136 self .assertIsInstance (
137137 self .calc_risk_period .impact_computation_strategy , ImpactCalcComputation
You can’t perform that action at this time.
0 commit comments