def test_setup_output_w_resume(sampler, tmpdir): """Test output configuration with a specified resume file""" p = tmpdir.mkdir('outputs') sampler.plot = False resume_file = \ NestedSampler.setup_output(sampler, f'{p}/tests', 'resume.pkl') assert resume_file == f'{p}/tests/resume.pkl'
def test_setup_output(sampler, tmpdir): """Test setting up the output directories""" p = tmpdir.mkdir('outputs') sampler.plot = False resume_file = NestedSampler.setup_output(sampler, f'{p}/tests') assert os.path.exists(f'{p}/tests') assert resume_file == f'{p}/tests/nested_sampler_resume.pkl'
def test_setup_output_w_plotting(sampler, tmpdir): """Test setting up the output directories with plot=True""" p = tmpdir.mkdir('outputs') sampler.plot = True NestedSampler.setup_output(sampler, f'{p}/tests') assert os.path.exists(f'{p}/tests/diagnostics')