Skip to content

Commit

Permalink
modified test script to be consistent with the implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
yuma-uematsu committed Jan 10, 2022
1 parent e0c1264 commit 2a00fcd
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions analysis/tests/test_std_pi0s.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ def test_default_list_works(self):
"""Check that the default list type works."""
stdPi0s_signature = inspect.signature(stdPi0s.stdPi0s)
default_listtype = stdPi0s_signature.parameters["listtype"].default
self._check_list(expected_lists=["pi0" + default_listtype, "pi0" + default_listtype, default_listtype])
self._check_list(
expected_lists=[
"pi0" +
default_listtype,
"pi0" +
default_listtype,
default_listtype +
"_nomcmatch",
default_listtype])

def test_all_list(self):
"""check that the builder function works with the all list"""
Expand Down Expand Up @@ -111,9 +119,22 @@ def test_eff50_May2020_list(self):
"eff50_May2020_nomcmatch",
"eff50_May2020"])

def test_eff60_May2020_nomcmatch_list(self):
"""check that the builder function works with the eff50_May2020_nomcmatch list"""
self._check_list("eff60_May2020_nomcmatch",
expected_lists=["pi0eff60_May2020",
"pi0eff60_May2020",
"eff60_May2020_nomcmatch"])

def test_eff60_May2020_list(self):
"""check that the builder function works with the eff60_May2020 list"""
self._check_list("eff60_May2020", expected_lists=["pi0eff60_May2020", "pi0eff60_May2020", "eff60_May2020"])
self._check_list(
"eff60_May2020",
expected_lists=[
"pi0eff60_May2020",
"pi0eff60_May2020",
"eff60_May2020_nomcmatch",
"eff60_May2020"])

def test_allfit_list(self):
"""check that the builder function works with the allFit list"""
Expand Down Expand Up @@ -177,6 +198,7 @@ def test_eff60_May2020fit_list(self):
expected_lists=[
"pi0eff60_May2020",
"pi0eff60_May2020",
'eff60_May2020_nomcmatch',
"eff60_May2020",
"eff60_May2020Fit"])

Expand All @@ -190,6 +212,16 @@ def test_skim(self):
"eff50_May2020_nomcmatch",
"skim"])

def test_SkimHighEff(self):
"""check that the builder function works with the skim list"""
self._check_list(
std_function=stdPi0s.loadStdSkimHighEffPi0,
expected_lists=[
"pi0eff60_May2020",
"pi0eff60_May2020",
"eff60_May2020_nomcmatch",
"SkimHighEff"])


if __name__ == '__main__':
unittest.main()

0 comments on commit 2a00fcd

Please sign in to comment.