Skip to content

test_zones

converter.tests.shieldhit.test_zones

test_water_phantom_zone

test_water_phantom_zone(water_phantom_zone_dict)

Test if the water phantom zone is parsed correctly

Source code in yaptide/converter/tests/shieldhit/test_zones.py
 9
10
11
12
13
14
15
def test_water_phantom_zone(water_phantom_zone_dict):
    """Test if the water phantom zone is parsed correctly"""
    assert water_phantom_zone_dict['name'] == 'Water_phantom_zone'
    zone_obj = Zone(water_phantom_zone_dict)
    assert zone_obj.id == 1
    assert zone_obj.material == 0 # why ???
    assert str(zone_obj) == '\n  001          +1'

water_phantom_zone_dict

water_phantom_zone_dict(project_shieldhit_json)

Part of the project.json file with the water phantom zone

Source code in yaptide/converter/tests/shieldhit/test_zones.py
4
5
6
7
@pytest.fixture(scope='module')
def water_phantom_zone_dict(project_shieldhit_json):
    """Part of the project.json file with the water phantom zone"""
    return project_shieldhit_json['zoneManager']['zones'][0]