def test_updating_rock_type_that_doesnt_exist(): """Test adding an new rock type with an extra attribute.""" mg = RasterModelGrid(3, 3) mg.add_zeros("node", "topographic__elevation") thicknesses = [1, 2, 4, 1, 5] ids = [1, 2, 1, 2, 1] attrs = {"K_sp": {1: 0.001, 2: 0.0001}} lith = Lithology(mg, thicknesses, ids, attrs) with pytest.raises(ValueError): lith.update_rock_properties("K_sp", 3, 4)
def test_updating_rock_type_that_doesnt_exist(): """Test adding an new rock type with an extra attribute.""" mg = RasterModelGrid((3, 3)) mg.add_zeros("node", "topographic__elevation") thicknesses = [1, 2, 4, 1, 5] ids = [1, 2, 1, 2, 1] attrs = {"K_sp": {1: 0.001, 2: 0.0001}} lith = Lithology(mg, thicknesses, ids, attrs) with pytest.raises(ValueError): lith.update_rock_properties("K_sp", 3, 4)
def test_updating_attribute_that_doesnt_exist(): """Test updating an attribute that doesn't exist.""" mg = RasterModelGrid((3, 3)) mg.add_zeros("topographic__elevation", at="node") thicknesses = [1, 2, 4, 1, 5] ids = [1, 2, 1, 2, 1] attrs = {"K_sp": {1: 0.001, 2: 0.0001}} lith = Lithology(mg, thicknesses, ids, attrs) with pytest.raises(ValueError): lith.update_rock_properties("spam", 1, 4)
def test_updating_attribute_that_doesnt_exist(): """Test updating an attribute that doesn't exist.""" mg = RasterModelGrid(3, 3) mg.add_zeros("node", "topographic__elevation") thicknesses = [1, 2, 4, 1, 5] ids = [1, 2, 1, 2, 1] attrs = {"K_sp": {1: 0.001, 2: 0.0001}} lith = Lithology(mg, thicknesses, ids, attrs) with pytest.raises(ValueError): lith.update_rock_properties("spam", 1, 4)