@@ -197,3 +197,44 @@ def test_dynamic_revenue_decomposition(include_business_tax, full_break_out):
197197 full_break_out = full_break_out ,
198198 )
199199 assert isinstance (df , pd .DataFrame )
200+
201+
202+ @pytest .mark .parametrize (
203+ "targets_dict" ,
204+ [
205+ # Single macroeconomic moment
206+ {r"Interest rate $(r)$" : 0.04 },
207+ # Multiple macroeconomic moments
208+ {
209+ r"Investment rate $(I/K)$" : 0.07 ,
210+ r"Capital-Output ratio $(K/Y)$" : 3.0 ,
211+ r"Consumption-Output ratio $(C/Y)$" : 0.65 ,
212+ },
213+ # Fiscal moments
214+ {
215+ r"Revenue to GDP ratio $(T/Y)$" : 0.20 ,
216+ r"Debt to GDP ratio $(D/Y)$" : 0.60 ,
217+ },
218+ # Unrecognized moment key (model value falls back to NaN)
219+ {"Custom unrecognized moment" : 0.5 },
220+ # Mix of known and unknown moments
221+ {
222+ r"Interest rate $(r)$" : 0.04 ,
223+ "Custom unrecognized moment" : 0.5 ,
224+ },
225+ ],
226+ ids = [
227+ "single macro moment" ,
228+ "multiple macro moments" ,
229+ "fiscal moments" ,
230+ "unrecognized moment" ,
231+ "mixed known and unknown" ,
232+ ],
233+ )
234+ def test_model_fit_table (targets_dict ):
235+ df = output_tables .model_fit_table (
236+ targets_dict ,
237+ base_params ,
238+ base_tpi ,
239+ )
240+ assert isinstance (df , pd .DataFrame )
0 commit comments