Skip to content

Commit

Permalink
Add actual test
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardo-rodrigues committed Jul 24, 2023
1 parent 39b3dec commit 89a618d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/data/minimalistic.dec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Example decfile for testing purposes:

# Line with "End" is strictly speaking not necessary
# Such "empty" files are relevant in LHCb for example when special decays are all defined in PYthon code
# Such "empty" files are relevant in LHCb for example when special decays are all defined in Python code
# inserted in commented-out lines
End
#
8 changes: 8 additions & 0 deletions tests/dec/test_dec.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ def test_non_parsed_decfile():
p.list_decay_mother_names()


def test_decfile_defining_stable_particle():
p = DecFileParser(DIR / "../data/test_stable-particle.dec")
p.parse()

assert p.number_of_decays == 1 # The decay of K_S0, even if no decay modes are defined
assert p.list_decay_modes("K_S0") == []


def test_non_existent_decay():
p = DecFileParser(DIR / "../data/test_example_Dst.dec")
p.parse()
Expand Down

0 comments on commit 89a618d

Please sign in to comment.