mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-09 19:06:37 +08:00
MAINT: Use numpy testing method instead of assertTrue.
So that when the test fails, the comparison is in a more readable format.
This commit is contained in:
@@ -371,4 +371,4 @@ class TestTALIB(TestCase):
|
||||
talib_data[key] = data[key][0].values
|
||||
talib_data['close'] = data['price'][0].values
|
||||
expected_result = talib_fn(talib_data, **t.call_kwargs)[-1]
|
||||
self.assertTrue(np.allclose(talib_result, expected_result))
|
||||
np.testing.assert_allclose(talib_result, expected_result)
|
||||
|
||||
Reference in New Issue
Block a user