Skip to content

Commit

Permalink
fix test bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dodu94 committed Feb 17, 2025
1 parent b210153 commit d5b10f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/helper/test_auxiliary_func.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
from __future__ import annotations

from importlib.resources import as_file, files

from jade.config.run_config import LibraryOpenMC
from jade.helper.aux_functions import get_code_lib, print_code_lib
from jade.helper.constants import CODE
from tests.config import resources as conf_res


def test_code_lib():
code = CODE.MCNP
lib = LibraryOpenMC(name="FENDL 3.2c", path="test")
with as_file(files(conf_res).joinpath("cross_sections.xml")) as file:
lib = LibraryOpenMC(name="FENDL 3.2c", path=file)
code_lib = print_code_lib(code, lib)

assert get_code_lib(code_lib) == (code.value, lib.name)

0 comments on commit d5b10f2

Please sign in to comment.