Skip to content

Commit 9c94f2d

Browse files
committed
tests: removing test_compatibility.
See 0.8.1 release notes: (#388) API: the MetaStock variant when the MAType is EMA, DEMA or TEMA is removed. Default behavior is unchanged. TA_SetCompatibility() and TA_GetCompatibility() remain, so existing sources still compile and link, but the setter now does nothing and the getter always answers TA_COMPATIBILITY_DEFAULT. Moving forward TA-Lib no longer supports "Compatibility Settings".
1 parent 8cadf5b commit 9c94f2d

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

‎tests/test_func.py‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,6 @@ def test_unstable_period_retired_is_a_warning_and_a_noop(name):
172172
assert _leading_unset(call()) == before[n], n
173173

174174

175-
def test_compatibility():
176-
a = np.arange(10, dtype=float)
177-
talib.set_compatibility(0)
178-
r = func.EMA(a, 3)
179-
assert_array_equal(r, [np.nan, np.nan, 1, 2, 3, 4, 5, 6, 7, 8])
180-
talib.set_compatibility(1)
181-
r = func.EMA(a, 3)
182-
assert_array_equal(r, [np.nan, np.nan,1.25,2.125,3.0625,4.03125,5.015625,6.0078125,7.00390625,8.001953125])
183-
talib.set_compatibility(0)
184-
185-
186175
def test_MIN(series):
187176
result = func.MIN(series, timeperiod=4)
188177
i = np.where(~np.isnan(result))[0][0]

0 commit comments

Comments
 (0)