Fixtures are called directly error
Created by: Zaharid
The update to pytest 4.0 disallows (for no reason whatsoever) a feature we use in the tests, namely calling a fixture inside another fixture, as in
======================================================= ERRORS =======================================================
_______________________________________ ERROR at setup of test_chi2_arithmetic _______________________________________
weighted_data = (PDF(name='NNPDF31_nnlo_as_0118'), [ExperimentSpec(name='NMC Experiment', datasets=(DataSetSpec(name='NMC', commondata...Spec(id=162, path=PosixPath('/home/zah/anaconda3/share/NNPDF/data/theory_162')), cuts=None, op='NULL', weight=100),))])
@pytest.fixture(scope='module')
def convolution_results_with_weights(weighted_data):
> return convolution_results(weighted_data)
E _pytest.warning_types.RemovedInPytest4Warning: Fixture "convolution_results" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
We should probably define normal functions that do the same, just to increase the noise. In the meantime, I'll specify pytest < 4 in the conda recipe.