Consider the repeated executions of setting/unsetting the backend to numpy, and loading the triangle, and yielding:
|
@pytest.fixture |
|
def raa(request): |
|
if request.param == "sparse_only_run": |
|
cl.options.set_option("ARRAY_BACKEND", "sparse") |
|
else: |
|
cl.options.set_option("ARRAY_BACKEND", "numpy") |
|
return cl.load_sample("raa") |
|
|
|
|
|
@pytest.fixture |
|
def qtr(request): |
|
if request.param == "sparse_only_run": |
|
cl.options.set_option("ARRAY_BACKEND", "sparse") |
|
else: |
|
cl.options.set_option("ARRAY_BACKEND", "numpy") |
|
return cl.load_sample("quarterly") |
This is repeated per sample data set. A template can be created that each data set can use so we can alter the template and propagate to the fixtures rather than update each one.
Consider the repeated executions of setting/unsetting the backend to numpy, and loading the triangle, and yielding:
chainladder-python/conftest.py
Lines 24 to 39 in cffab2c
This is repeated per sample data set. A template can be created that each data set can use so we can alter the template and propagate to the fixtures rather than update each one.