Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomomagni committed Sep 20, 2023
1 parent 523498a commit acd6d81
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/test_fonll.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,29 @@ def test_FONLLInfo():
full_list = [
"ffns3.pineappl.lz4",
"ffn03.pineappl.lz4",
"ffns4.pineappl.lz4",
"ffns4til.pineappl.lz4",
"ffns4bar.pineappl.lz4",
"ffn04.pineappl.lz4",
"ffns5.pineappl.lz4",
"ffns5til.pineappl.lz4",
"ffns5bar.pineappl.lz4",
]
fullfonll_fake_info = pineko.fonll.FONLLInfo(*full_list)
wrongfonll_fake_info = pineko.fonll.FONLLInfo(
full_list[0], full_list[1], full_list[2], full_list[3], None, None, full_list[6]
full_list[0], full_list[1], None, full_list[3], full_list[4], None, None, None, full_list[8]
)
partialfonll_fake_info = pineko.fonll.FONLLInfo(
full_list[0], full_list[1], full_list[2], None, None, None, None
full_list[0], full_list[1], None, full_list[3], None, None, None, None, None
)
name_list = [
"ffns3",
"ffn03",
"ffns4",
"ffns4til",
"ffns4bar",
"ffn04",
"ffns5",
"ffns5til",
"ffns5bar",
]
Expand All @@ -37,11 +41,11 @@ def test_FONLLInfo():
assert wrongfonll_fake_info.fk_paths == {
name: pathlib.Path(fk)
for name, fk in zip(
name_list[:4] + [name_list[-1]], full_list[:4] + [full_list[-1]]
name_list[:2] + name_list[3:5] + [name_list[-1]], full_list[:2] + full_list[3:5] + [full_list[-1]]
)
}
assert partialfonll_fake_info.fk_paths == {
name: pathlib.Path(fk)
for name, fk in zip(name_list[:3], full_list[:3])
for name, fk in zip(name_list[:2] + name_list[3:4], full_list[:2] + full_list[3:4])
if fk is not None
}

0 comments on commit acd6d81

Please sign in to comment.