MCPcopy
hub / github.com/quantopian/zipline / init_class_fixtures

Method init_class_fixtures

tests/test_examples.py:46–68  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

44
45 @classmethod
46 def init_class_fixtures(cls):
47 super(ExamplesTests, cls).init_class_fixtures()
48
49 register('test', lambda *args: None)
50 cls.add_class_callback(partial(unregister, 'test'))
51
52 with tarfile.open(test_resource_path('example_data.tar.gz')) as tar:
53 tar.extractall(cls.tmpdir.path)
54
55 cls.expected_perf = dataframe_cache(
56 cls.tmpdir.getpath(
57 'example_data/expected_perf/%s' %
58 pd.__version__.replace('.', '-'),
59 ),
60 serialization='pickle',
61 )
62
63 cls.no_benchmark_expected_perf = {
64 example_name: cls._no_benchmark_expectations_applied(
65 expected_perf.copy()
66 )
67 for example_name, expected_perf in cls.expected_perf.items()
68 }
69
70 @staticmethod
71 def _no_benchmark_expectations_applied(expected_perf):

Callers

nothing calls this directly

Calls 9

registerFunction · 0.90
test_resource_pathFunction · 0.90
dataframe_cacheClass · 0.90
add_class_callbackMethod · 0.80
getpathMethod · 0.80
replaceMethod · 0.80
copyMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected