Merge branch 'develop' into log_has_ref

This commit is contained in:
Matthias
2019-08-12 06:34:49 +02:00
4 changed files with 92 additions and 10 deletions

View File

@@ -10,6 +10,7 @@ from unittest.mock import MagicMock, PropertyMock
import arrow
import pytest
import numpy as np
from telegram import Chat, Message, Update
from freqtrade import constants, persistence
@@ -25,6 +26,10 @@ from freqtrade.worker import Worker
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):
# caplog mocker returns log as a tuple: ('freqtrade.something', logging.WARNING, 'foobar')
# and we want to match line against foobar in the tuple