def test_simulation_control_dict_methods(): """Test the to/from dict methods.""" sizing = SizingParameter(1) sizing_dict = sizing.to_dict() new_sizing = SizingParameter.from_dict(sizing_dict) assert new_sizing == sizing assert sizing_dict == new_sizing.to_dict()
def test_sizing_parameter_dict_methods(): """Test the to/from dict methods.""" sizing = SizingParameter(None, 1) relative_path = './tests/ddy/chicago.ddy' sizing.add_from_ddy_996_004(relative_path) sizing_dict = sizing.to_dict() new_sizing = SizingParameter.from_dict(sizing_dict) new_sizing.apply_location(sizing[0].location) assert new_sizing == sizing assert sizing_dict == new_sizing.to_dict()