tests: don't mask numpy errors as warnings in tests
This commit is contained in:
parent
8ba7657007
commit
5209ce5bfa
@ -10,6 +10,7 @@ from unittest.mock import MagicMock, PropertyMock
|
|||||||
|
|
||||||
import arrow
|
import arrow
|
||||||
import pytest
|
import pytest
|
||||||
|
import numpy as np
|
||||||
from telegram import Chat, Message, Update
|
from telegram import Chat, Message, Update
|
||||||
|
|
||||||
from freqtrade import constants, persistence
|
from freqtrade import constants, persistence
|
||||||
@ -25,6 +26,10 @@ from freqtrade.worker import Worker
|
|||||||
logging.getLogger('').setLevel(logging.INFO)
|
logging.getLogger('').setLevel(logging.INFO)
|
||||||
|
|
||||||
|
|
||||||
|
# Do not mask numpy errors as warnings that no one read, raise the exсeption
|
||||||
|
np.seterr(all='raise')
|
||||||
|
|
||||||
|
|
||||||
def log_has(line, logs):
|
def log_has(line, logs):
|
||||||
# caplog mocker returns log as a tuple: ('freqtrade.something', logging.WARNING, 'foobar')
|
# caplog mocker returns log as a tuple: ('freqtrade.something', logging.WARNING, 'foobar')
|
||||||
# and we want to match line against foobar in the tuple
|
# and we want to match line against foobar in the tuple
|
||||||
|
Loading…
Reference in New Issue
Block a user