Merge branch 'develop' into documentation

This commit is contained in:
fjosw 2023-02-17 11:51:19 +00:00
commit 39f000fc07
2 changed files with 44 additions and 2 deletions

View file

@ -165,3 +165,11 @@ def test_find_files():
fpre = "tune62"
with pytest.raises(Exception):
pe.input.openQCD._find_files(path, fpre, "ms5_xsf_" + qc, "dat")
def test_sort_names():
my_list = ['sfqcd_r1_id5', 'sfqcd_r10_id5', 'sfqcd_r7_id5', 'sfqcd_r2_id5', 'sfqcd_r2_id9', 'sfqcd_r10_id4']
presorted_list = ['sfqcd_r1_id5', 'sfqcd_r2_id5', 'sfqcd_r2_id9', 'sfqcd_r7_id5', 'sfqcd_r10_id4', 'sfqcd_r10_id5']
sorted_list = pe.input.openQCD._sort_names(my_list)
assert (all([sorted_list[i] == presorted_list[i] for i in range(len(sorted_list))]))