예제 #1
0
 def test_inconsistent_mode(self):
     with self.assertRaises(base.InvalidCalculationID) as ctx:
         base.check_precalc_consistency('classical_risk', 'scenario')
     msg = str(ctx.exception)
     self.assertEqual(
         msg, "In order to run a risk calculation of kind "
         "'classical_risk', you need to provide a "
         "calculation of kind ['classical'], "
         "but you provided a 'scenario' instead")
예제 #2
0
 def test_inconsistent_mode(self):
     with self.assertRaises(base.InvalidCalculationID) as ctx:
         base.check_precalc_consistency('classical_risk', 'scenario')
     msg = str(ctx.exception)
     self.assertEqual(
         msg, "In order to run a risk calculation of kind "
         "'classical_risk', you need to provide a "
         "calculation of kind ['classical', 'classical_risk'], "
         "but you provided a 'scenario' instead")
예제 #3
0
 def test_ok(self):
     base.check_precalc_consistency('scenario_risk', 'scenario')
예제 #4
0
 def test_ok(self):
     base.check_precalc_consistency('scenario_risk', 'scenario')