From 590988c52604afcf7c28bd54dc787a329de52ee2 Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Mon, 31 Mar 2025 20:12:31 +0000 Subject: [PATCH] write first test for sfcf input. --- tests/sfcf_in_test.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/sfcf_in_test.py diff --git a/tests/sfcf_in_test.py b/tests/sfcf_in_test.py new file mode 100644 index 0000000..72921e7 --- /dev/null +++ b/tests/sfcf_in_test.py @@ -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]] \ No newline at end of file