Merge pull request #33 from gcarq/disable-debuglog-backtest
Disable debug level logging when running backtesting
This commit is contained in:
commit
f493df7a82
@ -3,6 +3,7 @@ import unittest
|
|||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
import arrow
|
import arrow
|
||||||
from pandas import DataFrame
|
from pandas import DataFrame
|
||||||
from analyze import analyze_ticker
|
from analyze import analyze_ticker
|
||||||
@ -28,6 +29,10 @@ class TestMain(unittest.TestCase):
|
|||||||
"stoploss": -0.10
|
"stoploss": -0.10
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls):
|
||||||
|
logging.disable(logging.DEBUG) # disable debug logs that slow backtesting a lot
|
||||||
|
|
||||||
@unittest.skipIf(not os.environ.get('BACKTEST', False), "slow, should be run manually")
|
@unittest.skipIf(not os.environ.get('BACKTEST', False), "slow, should be run manually")
|
||||||
def test_backtest(self):
|
def test_backtest(self):
|
||||||
trades = []
|
trades = []
|
||||||
|
Loading…
Reference in New Issue
Block a user