Skip to content

Commit

Permalink
TST: fix test fixings_table_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
attack68 committed Jan 15, 2024
1 parent a61c628 commit 3f1b7ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rateslib/legs.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ def _set_fixings(
fixings_ = []
elif isinstance(fixings, Series):
fixings_ = fixings.sort_index()
fixings_ = self._get_fixings_from_series(fixings)
fixings_ = self._get_fixings_from_series(fixings_)
elif isinstance(fixings, tuple):
fixings_ = [fixings[0]] + self._get_fixings_from_series(fixings[1], 1)
elif not isinstance(fixings, list):
Expand Down
3 changes: 1 addition & 2 deletions tests/test_legs.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def test_rfr_with_fixings_fixings_table_issue(self):
id="estr",
)
from rateslib import Solver
solver = Solver(
Solver(
curves=[curve],
instruments=instruments,
s=[
Expand Down Expand Up @@ -293,7 +293,6 @@ def test_rfr_with_fixings_fixings_table_issue(self):
fixed_rate=3.922,
)
result = swap.leg2.fixings_table(curve)
expected = 1.0
assert result.loc[dt(2024, 1, 10), "notional"] == 0.0
assert abs(result.loc[dt(2024, 1, 11), "notional"] - 3006829846) < 1.0
assert abs(result.loc[dt(2023, 12, 20), "rates"] - 3.901) < 0.001
Expand Down

0 comments on commit 3f1b7ff

Please sign in to comment.