Skip to content

Commit

Permalink
test: update tests for Asset
Browse files Browse the repository at this point in the history
  • Loading branch information
chilango74 committed Oct 5, 2024
1 parent 54b7d34 commit 6b56006
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ def test_usdrub(init_asset_usdrub):
assert_series_equal(init_asset_usdrub.close_monthly["2019-01":"2020-01"], close_monthly_sample, rtol=1e-1)


@mark.xfail
def test_eurusd(init_asset_eurusd):
close_daily_sample = pd.read_pickle(conftest.data_folder / "eurusd_close_daily.pkl")
assert_series_equal(init_asset_eurusd.close_daily["2019-01":"2020-01"], close_daily_sample, rtol=1e-2)
assert init_asset_eurusd.close_daily.loc["2020-01-15"] == 1.1149


def test_close_daily(init_asset_spy, init_asset_usdrub):
assert init_asset_spy.close_daily.loc["2000-01-20"] == 144.75


def test_close_monthly(init_asset_spy):
assert init_asset_spy.close_monthly.loc["2000-01"] == 139.625 # changed in 2022 MAY from 139.5625
# changed in 2022 MAY from 139.5625
# changed in 2024 MAY from 139.625 to 139.5625
assert init_asset_spy.close_monthly.loc["2000-01"] == 139.5625


def test_adj_close(init_asset_pif):
Expand All @@ -51,4 +51,4 @@ def test_dividends(init_asset_spy):


def test_nav_ts(init_asset_pif):
assert init_asset_pif.nav_ts[0] == 101820352.18
assert init_asset_pif.nav_ts.iloc[0] == 101820352.18

0 comments on commit 6b56006

Please sign in to comment.