mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-18 12:20:12 +08:00
TST: Filter out pandas performance warnings in tests (for now)
This commit is contained in:
@@ -16,7 +16,6 @@ from collections import namedtuple
|
||||
import datetime
|
||||
from datetime import timedelta
|
||||
from textwrap import dedent
|
||||
import warnings
|
||||
from unittest import skip
|
||||
from copy import deepcopy
|
||||
|
||||
@@ -32,11 +31,11 @@ from testfixtures import TempDirectory
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pytz
|
||||
from pandas.io.common import PerformanceWarning
|
||||
|
||||
from zipline import (
|
||||
run_algorithm,
|
||||
TradingAlgorithm,
|
||||
)
|
||||
from zipline import run_algorithm
|
||||
from tests.warnings_catcher import WarningsCatcher
|
||||
from zipline import TradingAlgorithm
|
||||
from zipline.api import FixedSlippage
|
||||
from zipline.assets import Equity, Future
|
||||
from zipline.assets.synthetic import (
|
||||
@@ -1960,7 +1959,7 @@ def handle_data(context, data):
|
||||
pass
|
||||
""")
|
||||
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
with WarningsCatcher([PerformanceWarning]) as w:
|
||||
algo = TradingAlgorithm(
|
||||
script=algocode,
|
||||
sim_params=sim_params,
|
||||
|
||||
Reference in New Issue
Block a user