mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-11 11:16:15 +08:00
TST: Use testing market data with run_algorithm
so env doesn't need to download it
This commit is contained in:
@@ -21,8 +21,9 @@ import pandas as pd
|
||||
|
||||
from zipline import examples
|
||||
from zipline.data.bundles import register, unregister
|
||||
from zipline.testing import test_resource_path
|
||||
from zipline.testing.fixtures import WithTmpDir, ZiplineTestCase
|
||||
from zipline.testing import test_resource_path, copy_market_data
|
||||
from zipline.testing.fixtures import WithTmpDir, ZiplineTestCase, \
|
||||
WithTradingEnvironment
|
||||
from zipline.testing.predicates import assert_equal
|
||||
from zipline.utils.cache import dataframe_cache
|
||||
|
||||
@@ -53,6 +54,9 @@ class ExamplesTests(WithTmpDir, ZiplineTestCase):
|
||||
serialization='pickle',
|
||||
)
|
||||
|
||||
copy_market_data(WithTradingEnvironment.MARKET_DATA_DIR,
|
||||
cls.tmpdir.getpath('example_data/root'))
|
||||
|
||||
@parameterized.expand(examples.EXAMPLE_MODULES)
|
||||
def test_example(self, example_name):
|
||||
actual_perf = examples.run_example(
|
||||
|
||||
Reference in New Issue
Block a user