def test_grid_var_rank_fail(): model = BmiGridmet() model.initialize() with pytest.raises(KeyError): model.get_grid_rank(invalid_grid_id)
def test_grid_var_rank(): model = BmiGridmet() model.initialize() assert model.get_grid_rank(grid_id) == 2