MAINT: Skip more rows to match change in treasury data format

I'm not sure what the raw csv pulled from the federal reserve looked like before, but when trying to download fresh treasure data (data not stored in `./zipline`), there is an error that says "Time Period not in list". After checking the raw csv now, it looks like there are 5 header rows rather than just 1, so skipping those rows removes that error.
This commit is contained in:
Freddie Vargus
2017-06-05 11:44:01 -04:00
parent 7a6f45b971
commit a12c34c39c
6 changed files with 14 additions and 6872 deletions
+6
View File
@@ -25,6 +25,8 @@ from zipline.testing import test_resource_path
from zipline.testing.fixtures import WithTmpDir, ZiplineTestCase
from zipline.testing.predicates import assert_equal
from zipline.utils.cache import dataframe_cache
from zipline.utils.paths import ensure_file
# Otherwise the next line sometimes complains about being run too late.
_multiprocess_can_split_ = False
@@ -53,6 +55,10 @@ class ExamplesTests(WithTmpDir, ZiplineTestCase):
serialization='pickle',
)
market_data = ('SPY_benchmark.csv', 'treasury_curves.csv')
for data in market_data:
ensure_file(cls.tmpdir.getpath('example_data/root/data/' + data))
@parameterized.expand(sorted(examples.EXAMPLE_MODULES))
def test_example(self, example_name):
actual_perf = examples.run_example(