-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_leumi.py
36 lines (28 loc) · 858 Bytes
/
test_leumi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# pylint: disable=missing-module-docstring, missing-function-docstring, redefined-outer-name
import pandas as pd
import pytest
from xil._currencies import CurrencyCode
from xil.leumi import get_leumi_df
from ._test_df import _test_df_sanity
@pytest.fixture
def df() -> pd.DataFrame:
return get_leumi_df()
@pytest.fixture()
def expected_currencies() -> list[CurrencyCode]:
return [
CurrencyCode.USD,
CurrencyCode.EUR,
CurrencyCode.GBP,
CurrencyCode.JPY,
CurrencyCode.CHF,
CurrencyCode.AUD,
CurrencyCode.CAD,
CurrencyCode.ZAR,
CurrencyCode.AED,
CurrencyCode.SEK,
CurrencyCode.NOK,
CurrencyCode.DKK,
]
@pytest.mark.live
def test_df(df: pd.DataFrame, expected_currencies: list[CurrencyCode]) -> None:
_test_df_sanity(df, expected_currencies)