MCPcopy Create free account
hub / github.com/Derive-Risk/pyfair / test_calculation

Method test_calculation

tests/model/test_model.py:100–109  ·  view source on GitHub ↗

Run a calulate all.

(self)

Source from the content-addressed store, hash-verified

98 model.calculate_all()
99
100 def test_calculation(self):
101 """Run a calulate all."""
102 # Create model and import data
103 model = FairModel('Test', self.N_SAMPLES)
104 model.input_data('Loss Magnitude', constant=100)
105 # Calculate based on incomplete data
106 self.assertRaises(FairException, model.calculate_all)
107 # Complete calculation and run
108 model.input_data('Loss Event Frequency', constant=10)
109 model.calculate_all()
110
111 def test_exports(self):
112 """Test outputs post calculation"""

Callers

nothing calls this directly

Calls 3

input_dataMethod · 0.95
calculate_allMethod · 0.95
FairModelClass · 0.90

Tested by

no test coverage detected