-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a329696
commit f486c4b
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
validphys2/src/validphys/tests/test_scalevariationtheoryids.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import importlib.resources as resources | ||
|
||
from ruamel.yaml import YAML | ||
|
||
import validphys.scalevariations | ||
|
||
yaml = YAML() | ||
|
||
|
||
def test_unique_theoryid_variations(): | ||
"""Check that for each theoryid there is only one set of scale variations in | ||
scalevariationtheoryids.yaml | ||
""" | ||
file_path = resources.files(validphys.scalevariations).joinpath("scalevariationtheoryids.yaml") | ||
with file_path.open("r") as file: | ||
data = yaml.load(file) | ||
thids = [k["theoryid"] for k in data["scale_variations_for"]] | ||
assert len(thids) == len(set(thids)) |