def test_histogram_is_needed(sam_reg_sys, needed): assert configuration.histogram_is_needed(*sam_reg_sys) is needed # non-supported systematic with pytest.raises( NotImplementedError, match="other systematics not yet implemented" ) as e_info: configuration.histogram_is_needed({}, {}, {"Type": "unknown"})
def test_histogram_is_needed_unknown(): # non-supported systematic with pytest.raises(NotImplementedError, match="other systematics not yet implemented"): configuration.histogram_is_needed({}, {}, {"Type": "unknown"}, "")
def test_histogram_is_needed(reg_sam_sys_tem, is_needed): reg, sam, sys, tem = reg_sam_sys_tem assert configuration.histogram_is_needed(*reg_sam_sys_tem) is is_needed
def test_histogram_is_needed_unknown(): # non-supported systematic with pytest.raises(ValueError, match="unknown systematics type: unknown"): configuration.histogram_is_needed({}, {}, {"Type": "unknown"}, "")
def test_histogram_is_needed(reg_sam_sys_tem, is_needed): # could also mock region_contains_sample, region_contains_modifier, and # sample_contains_modifier reg, sam, sys, tem = reg_sam_sys_tem assert configuration.histogram_is_needed(*reg_sam_sys_tem) is is_needed