Skip to content

Commit c4b5852

Browse files
committed
test scalar case
1 parent f20deb4 commit c4b5852

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/test_fiscal.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,16 +271,17 @@ def test_get_TR(
271271
(r, p2, "SS", r_gov2),
272272
(r, p3, "SS", r_gov3),
273273
(r, p3, "TPI", r_gov3),
274+
(r, p3, "scalar", r_gov3),
274275
],
275-
ids=["Scale only", "Scale and shift", "r_gov < 0", "TPI"],
276+
ids=["Scale only", "Scale and shift", "r_gov < 0", "TPI", "scalar"],
276277
)
277278
def test_get_r_gov(r, p, method, r_gov_expected):
278279
# if r is scalar
279280
if method == "SS":
280281
DY_ratio = 0.0
281282
else:
282283
DY_ratio = np.zeros_like(r)
283-
r_gov = fiscal.get_r_gov(r, DY_ratio, p, method)
284+
r_gov = fiscal.get_r_gov(r, DY_ratio, p, method, t=0)
284285
assert np.allclose(r_gov, r_gov_expected)
285286

286287

0 commit comments

Comments
 (0)