Skip to content

Commit

Permalink
fix up coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kratsg authored and matthewfeickert committed Oct 25, 2021
1 parent 3d3d7a0 commit 3bb162c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,12 +1087,16 @@ def test_pdf_invalid_parameter_shapes(backend):
# - b/c uncorrelated, we have 1 par per bin for shapesys (so nbins)
# - actual data + aux data = 2 * nbins
assert pdf.expected_actualdata(pars).shape[-1] == nbins
assert pdf.main_model.expected_data(pars).shape[-1] == nbins
assert pdf.expected_auxdata(pars).shape[-1] == nbins
assert pdf.expected_data(pars).shape[-1] == 2 * nbins

with pytest.raises(pyhf.exceptions.InvalidPdfParameters):
pdf.expected_actualdata(pars[: nbins - 1])

with pytest.raises(pyhf.exceptions.InvalidPdfParameters):
pdf.main_model.expected_data(pars[: nbins - 1])

with pytest.raises(pyhf.exceptions.InvalidPdfParameters):
pdf.expected_auxdata(pars[: nbins - 1])

Expand All @@ -1102,6 +1106,9 @@ def test_pdf_invalid_parameter_shapes(backend):
with pytest.raises(pyhf.exceptions.InvalidPdfParameters):
pdf.expected_actualdata(pars + [pars[-1]])

with pytest.raises(pyhf.exceptions.InvalidPdfParameters):
pdf.main_model.expected_data(pars + [pars[-1]])

with pytest.raises(pyhf.exceptions.InvalidPdfParameters):
pdf.expected_auxdata(pars + [pars[-1]])

Expand Down

0 comments on commit 3bb162c

Please sign in to comment.