Skip to content

Commit 404eb26

Browse files
committed
Adding another polars test.
1 parent a9c4b78 commit 404eb26

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

talib/test_polars.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,18 @@ def test_MAVP():
3939
assert_is_instance(sma3, pl.Series)
4040
assert_np_arrays_equal(result.to_numpy()[2::2], sma2.to_numpy()[2::2])
4141
assert_np_arrays_equal(result.to_numpy()[3::2], sma3.to_numpy()[3::2])
42+
43+
def test_TEVA():
44+
size = 50
45+
df = pl.DataFrame(
46+
{
47+
"open": np.random.uniform(low=0.0, high=100.0, size=size).astype("float32"),
48+
"high": np.random.uniform(low=0.0, high=100.0, size=size).astype("float32"),
49+
"low": np.random.uniform(low=0.0, high=100.0, size=size).astype("float32"),
50+
"close": np.random.uniform(low=0.0, high=100.0, size=size).astype("float32"),
51+
"volume": np.random.uniform(low=0.0, high=100.0, size=size).astype("float32")
52+
}
53+
)
54+
tema = ta.TEMA(df, timeperiod=9)
55+
assert_is_instance(tema, pl.Series)
56+
assert_equal(len(tema), 50)

0 commit comments

Comments
 (0)