Skip to content

test_scoring_parser

converter.tests.fluka.test_scoring_parser

detectors_json

detectors_json(project_fluka_json)
Source code in yaptide/converter/tests/fluka/test_scoring_parser.py
5
6
7
@pytest.fixture(scope='module')
def detectors_json(project_fluka_json):
    return project_fluka_json['detectorManager']

scorings_json

scorings_json(project_fluka_json)
Source code in yaptide/converter/tests/fluka/test_scoring_parser.py
10
11
12
@pytest.fixture(scope='module')
def scorings_json(project_fluka_json):
    return project_fluka_json['scoringManager']

test_parse_scoring

test_parse_scoring(detectors_json, scorings_json)
Source code in yaptide/converter/tests/fluka/test_scoring_parser.py
15
16
17
18
19
20
21
def test_parse_scoring(detectors_json, scorings_json):

    scorings = parse_scorings(detectors_json, scorings_json)

    assert scorings[0].quantities[0].name == 'Fluence'
    assert scorings[0].detector.name == 'Detector'
    assert scorings[0].quantities[0].keyword == 'Fluence'