mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-12 12:12:04 +08:00
fixed logging for tests
This commit is contained in:
@@ -2,7 +2,7 @@ from datetime import timedelta
|
||||
from collections import defaultdict
|
||||
from unittest2 import TestCase
|
||||
|
||||
from logbook.compat import LoggingHandler
|
||||
from zipline.utils.test_utils import setup_logger, teardown_logger
|
||||
|
||||
import zipline.utils.factory as factory
|
||||
from zipline.finance.vwap import DailyVWAP, VWAPTransform
|
||||
@@ -25,11 +25,10 @@ class ZiplineWithTransformsTestCase(TestCase):
|
||||
'sid' : 133,
|
||||
'devel' : True
|
||||
}
|
||||
self.log_handler = LoggingHandler()
|
||||
self.log_handler.push_application()
|
||||
setup_logger(self, '/var/log/qexec/qexed.log')
|
||||
|
||||
def tearDown(self):
|
||||
self.log_handler.pop_application()
|
||||
teardown_logger(self)
|
||||
|
||||
def test_vwap_tnfm(self):
|
||||
zipline = SimulatedTrading.create_test_zipline(
|
||||
@@ -47,8 +46,7 @@ class FinanceTransformsTestCase(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.trading_environment = factory.create_trading_environment()
|
||||
self.log_handler = LoggingHandler()
|
||||
self.log_handler.push_application()
|
||||
setup_logger(self, '/var/log/qexec/qexec.log')
|
||||
|
||||
def tearDown(self):
|
||||
self.log_handler.pop_application()
|
||||
|
||||
Reference in New Issue
Block a user