Skip to content

Commit

Permalink
REF: amend cache_states to decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
attack68 committed Jan 28, 2025
1 parent 391e21e commit 9f65223
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions python/tests/test_fx_volatility.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,10 +762,24 @@ def test_surface_validate_states(self):
assert pre_state != post_state # validate states has been run and updated the state.

def test_initialisation_state_smile(self):
assert False
smile = FXDeltaVolSmile(
nodes={0.25: 10.0, 0.5: 10.0, 0.75: 11.0},
delta_type="forward",
eval_date=dt(2023, 3, 16),
expiry=dt(2023, 6, 16),
id="vol",
)
assert smile._state != 0

def test_initialisation_state_surface(self):
assert False
surf = FXDeltaVolSurface(
expiries=[dt(2000, 1, 1), dt(2001, 1, 1)],
delta_indexes=[0.5],
node_values=[[10.0], [9.0]],
eval_date=dt(1999, 1, 1),
delta_type="forward",
)
assert surf._state != 0

def test_validate_delta_type() -> None:
with pytest.raises(ValueError, match="`delta_type` must be in"):
Expand Down

0 comments on commit 9f65223

Please sign in to comment.