added check_existing_files method to handler class #268
5 fail, 2 skipped, 221 pass in 6m 14s
Annotations
Check warning on line 0 in climada_petals.engine.test.test_supplychain.TestSupplyChain_boario
github-actions / Petals / Unit Test Results (3.11)
test_calc_impacts_boario_rebuilding_missing (climada_petals.engine.test.test_supplychain.TestSupplyChain_boario) failed
climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain_boario testMethod=test_calc_impacts_boario_rebuilding_missing>
def test_calc_impacts_boario_rebuilding_missing(self):
"""Test running without params."""
# We check that at least one warning is raised when
# called without parameters.
with self.assertRaises(ValueError):
self.sup.calc_impacts("boario", boario_type="rebuild")
with self.assertRaises(TypeError):
> self.sup.calc_impacts("boario",
boario_type="rebuild",
boario_params={"event":{
"rebuilding_sectors":{"Manuf. & Const.":1},
}
})
climada_petals/engine/test/test_supplychain.py:707:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
climada_petals/engine/supplychain.py:809: in calc_impacts
events_list = [EventKapitalRebuild.from_series(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> events_list = [EventKapitalRebuild.from_series(
impact=self.secs_imp.iloc[i],
occurrence = (self.events_date[i]-self.events_date.min()+1),
# event monetary factor equal to the impact units. self.secs_imp
# was rescaled by the conversion_factor upon its construction so
# we pass the conversion_factor as unit
event_monetary_factor = self.conversion_factor(),
**boario_params['event']
) for i in range(n_events)
]
E AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'
climada_petals/engine/supplychain.py:809: AttributeError
Check warning on line 0 in climada_petals.engine.test.test_supplychain.TestSupplyChain_boario
github-actions / Petals / Unit Test Results (3.11)
test_calc_impacts_boario_rebuilding_no_param (climada_petals.engine.test.test_supplychain.TestSupplyChain_boario) failed
climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain_boario testMethod=test_calc_impacts_boario_rebuilding_no_param>
def test_calc_impacts_boario_rebuilding_no_param(self):
"""Test running without params."""
# We check that at least one warning is raised when
# called without parameters.
> self.sup.calc_impacts("boario",
boario_type="rebuild",
boario_params={"event":{
"rebuilding_sectors":{"Manuf. & Const.":1},
"rebuild_tau":365,
}
})
climada_petals/engine/test/test_supplychain.py:719:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
climada_petals/engine/supplychain.py:809: in calc_impacts
events_list = [EventKapitalRebuild.from_series(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.0 = <range_iterator object at 0x7f212138f0f0>
> events_list = [EventKapitalRebuild.from_series(
impact=self.secs_imp.iloc[i],
occurrence = (self.events_date[i]-self.events_date.min()+1),
# event monetary factor equal to the impact units. self.secs_imp
# was rescaled by the conversion_factor upon its construction so
# we pass the conversion_factor as unit
event_monetary_factor = self.conversion_factor(),
**boario_params['event']
) for i in range(n_events)
]
E AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'
climada_petals/engine/supplychain.py:809: AttributeError
Check warning on line 0 in climada_petals.engine.test.test_supplychain.TestSupplyChain_boario
github-actions / Petals / Unit Test Results (3.11)
test_calc_impacts_boario_rebuilding_sep (climada_petals.engine.test.test_supplychain.TestSupplyChain_boario) failed
climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain_boario testMethod=test_calc_impacts_boario_rebuilding_sep>
def test_calc_impacts_boario_rebuilding_sep(self):
"""Test running without params."""
# We check that at least one warning is raised when
# called without parameters.
> self.sup.calc_impacts("boario",
boario_type="rebuild",
boario_aggregate="sep",
boario_params={"event":{
"rebuilding_sectors":{"Manuf. & Const.":1},
"rebuild_tau":365,
}
})
climada_petals/engine/test/test_supplychain.py:769:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
climada_petals/engine/supplychain.py:809: in calc_impacts
events_list = [EventKapitalRebuild.from_series(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.0 = <range_iterator object at 0x7f21210e9740>
> events_list = [EventKapitalRebuild.from_series(
impact=self.secs_imp.iloc[i],
occurrence = (self.events_date[i]-self.events_date.min()+1),
# event monetary factor equal to the impact units. self.secs_imp
# was rescaled by the conversion_factor upon its construction so
# we pass the conversion_factor as unit
event_monetary_factor = self.conversion_factor(),
**boario_params['event']
) for i in range(n_events)
]
E AttributeError: type object 'EventKapitalRebuild' has no attribute 'from_series'
climada_petals/engine/supplychain.py:809: AttributeError
Check warning on line 0 in climada_petals.engine.test.test_supplychain.TestSupplyChain_boario
github-actions / Petals / Unit Test Results (3.11)
test_calc_impacts_boario_recovery_no_param (climada_petals.engine.test.test_supplychain.TestSupplyChain_boario) failed
climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: type object 'EventKapitalRecover' has no attribute 'from_series'
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain_boario testMethod=test_calc_impacts_boario_recovery_no_param>
def test_calc_impacts_boario_recovery_no_param(self):
"""Test running without params."""
# We check that at least one warning is raised when
# called without parameters.
with self.assertWarns(Warning):
> self.sup.calc_impacts("boario")
climada_petals/engine/test/test_supplychain.py:661:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
climada_petals/engine/supplychain.py:796: in calc_impacts
events_list = [EventKapitalRecover.from_series(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.0 = <range_iterator object at 0x7f212138ecd0>
> events_list = [EventKapitalRecover.from_series(
impact=self.secs_imp.iloc[i],
occurrence = int(self.events_date[i]-self.events_date.min()+1),
# event monetary factor equals the impact units. self.secs_imp
# was rescaled by the conversion_factor upon its construction so
# we pass the conversion_factor as unit
event_monetary_factor = self.conversion_factor(),
**boario_params['event']
) for i in range(n_events)
]
E AttributeError: type object 'EventKapitalRecover' has no attribute 'from_series'
climada_petals/engine/supplychain.py:796: AttributeError
Check warning on line 0 in climada_petals.engine.test.test_supplychain.TestSupplyChain_boario
github-actions / Petals / Unit Test Results (3.11)
test_calc_impacts_boario_unknown (climada_petals.engine.test.test_supplychain.TestSupplyChain_boario) failed
climada_petals/tests_xml/tests.xml [took 0s]
Raw output
AttributeError: type object 'EventKapitalRecover' has no attribute 'from_series'
self = <climada_petals.engine.test.test_supplychain.TestSupplyChain_boario testMethod=test_calc_impacts_boario_unknown>
def test_calc_impacts_boario_unknown(self):
with self.assertRaises(RuntimeError):
self.sup.calc_impacts("boario", boario_type="xx")
with self.assertRaises(RuntimeError):
> self.sup.calc_impacts("boario", boario_aggregate="xx")
climada_petals/engine/test/test_supplychain.py:652:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
climada_petals/engine/supplychain.py:796: in calc_impacts
events_list = [EventKapitalRecover.from_series(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> events_list = [EventKapitalRecover.from_series(
impact=self.secs_imp.iloc[i],
occurrence = int(self.events_date[i]-self.events_date.min()+1),
# event monetary factor equals the impact units. self.secs_imp
# was rescaled by the conversion_factor upon its construction so
# we pass the conversion_factor as unit
event_monetary_factor = self.conversion_factor(),
**boario_params['event']
) for i in range(n_events)
]
E AttributeError: type object 'EventKapitalRecover' has no attribute 'from_series'
climada_petals/engine/supplychain.py:796: AttributeError