fixed logging for tests

This commit is contained in:
fawce
2012-07-26 18:45:42 -04:00
parent 8a758c1293
commit 83da8d2310
5 changed files with 23 additions and 32 deletions
+4 -6
View File
@@ -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()