TST: Use testing market data with run_algorithm

so env doesn't need to download it
This commit is contained in:
Richard Frank
2017-05-18 12:54:06 -04:00
parent 0f6dbcef3c
commit ec396bd1ea
7 changed files with 62 additions and 26 deletions
+6 -2
View File
@@ -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(