write first test for sfcf input.
This commit is contained in:
parent
567d6f1153
commit
590988c526
1 changed files with 29 additions and 0 deletions
29
tests/sfcf_in_test.py
Normal file
29
tests/sfcf_in_test.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
import corrlib.input.sfcf as input
|
||||
import json
|
||||
|
||||
def test_get_specs():
|
||||
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]]
|
Loading…
Add table
Add a link
Reference in a new issue