-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |