Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better testing of HTML particle names #601

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/particle/particle/particle.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def describe(self) -> str:

@property
def evtgen_name(self) -> str:
"This is the name used in EvtGen."
"The particle name as used in EvtGen."
return EvtGenName2PDGIDBiMap[self.pdgid]

@property
Expand All @@ -948,7 +948,7 @@ def programmatic_name(self) -> str:

@property
def html_name(self) -> str:
"This is the name in HTML."
"The particle name in HTML."
return latex_to_html_name(self.latex_name)

@classmethod
Expand Down
4 changes: 4 additions & 0 deletions tests/particle/test_particle.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,12 @@ def test_all_particles_are_loaded():
(11, "e<SUP>-</SUP>"), # e-
(-13, "&#x03bc;<SUP>+</SUP>"), # mu+
(-14, "&#x03bd;&#773;<SUB>&#x03bc;</SUB>"), # nu_mu_bar
(18, "&#x03bd;<SUB>&#x03c4;<SUP>&#8242;</SUP></SUB>"), # nu_tau_prime
(111, "&#x03c0;<SUP>0</SUP>"), # pi0
(-211, "&#x03c0;<SUP>-</SUP>"), # pi-
(-213, "&#x03c1;(770)<SUP>-</SUP>"), # rho(770)-
(331, "&#x03b7;<SUP>&#8242;</SUP>(958)"), # eta_prime
(335, "f<SUB>2</SUB><SUP>&#8242;</SUP>(1525)"), # f2'(1525)
(20213, "a<SUB>1</SUB>(1260)<SUP>+</SUP>"), # a_1(1260)+
(321, "K<SUP>+</SUP>"), # K+
(130, "K<SUB>L</SUB><SUP>0</SUP>"), # K_L
Expand All @@ -415,6 +418,7 @@ def test_all_particles_are_loaded():
(-2224, "&#x0394;&#773;(1232)<SUP>--</SUP>"), # Delta_bar(1232)--
(3322, "&#x039e;<SUP>0</SUP>"), # Xi0
(-3322, "&#x039e;&#773;<SUP>0</SUP>"), # Xi0_bar
(4312, "&#x039e;<SUB>c</SUB><SUP>&#8242; 0</SUP>"), # Xi_c'0
(-5122, "&#x039b;&#773;<SUB>b</SUB><SUP>0</SUP>"), # Lb0_bar
)

Expand Down
Loading