From 3bb162c6e76c08a217ed7614a74f2e8a19a6aa30 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Mon, 17 May 2021 08:27:00 -0400 Subject: [PATCH] fix up coverage --- tests/test_pdf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_pdf.py b/tests/test_pdf.py index 0ee97499ba..20755eaa7a 100644 --- a/tests/test_pdf.py +++ b/tests/test_pdf.py @@ -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]) @@ -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]])