corrlib/tests/sfcf_in_test.py
Justus Kuhlmann 480c04e069
All checks were successful
Mypy / mypy (push) Successful in 1m12s
Pytest / pytest (3.12) (push) Successful in 1m15s
Pytest / pytest (3.13) (push) Successful in 1m12s
Pytest / pytest (3.14) (push) Successful in 1m15s
Ruff / ruff (push) Successful in 1m2s
Mypy / mypy (pull_request) Successful in 1m11s
Pytest / pytest (3.12) (pull_request) Successful in 1m16s
Pytest / pytest (3.13) (pull_request) Successful in 1m14s
Pytest / pytest (3.14) (pull_request) Successful in 1m15s
Ruff / ruff (pull_request) Successful in 1m2s
lint
2026-03-23 16:18:32 +01:00

29 lines
660 B
Python

import corrlib.input.sfcf as input
import json
def test_get_specs() -> None:
parameters = {
'crr': [
'f_P', 'f_A'
],
'qr': {
'q1': 'a',
'q2': 'b',
'q3': 'c'
},
'wf_offsets': [
[0, 0, 0],
[1 ,2, 3],
[4 ,5, 6],
],
'wf_coeff': [[1, 0.5, 0.5]],
'wf_basis': [
[0, 0],
[1, 2],
[4, 5],
]
}
key = "f_P/q1 q2/1/0/0"
specs = json.loads(input.get_specs(key, parameters))
assert specs['quarks'] == ['a', 'b']
assert specs['wf1'][0] == [1, [0, 0]]