diff --git a/powersimdata/input/tests/test_change_table.py b/powersimdata/input/tests/test_change_table.py index 4bd4c4255..19447a157 100644 --- a/powersimdata/input/tests/test_change_table.py +++ b/powersimdata/input/tests/test_change_table.py @@ -477,12 +477,18 @@ def test_remove_branch(ct): def test_remove_bus(ct): + with pytest.raises(ValueError): + # Can't remove, because there are branches attached to it + ct.remove_bus({1}) + ct.remove_branch({0, 1, 2}) ct.remove_bus({1}) with pytest.raises(ValueError): # Can't remove again, because it shouldn't exist ct.remove_bus({1}) + # Evan after we remove the branch connected to bus 845... + ct.remove_branch({1094}) with pytest.raises(ValueError): - # Can't remove this bus, since there's a generator with non-zero capacity + # We can't remove this bus, since there's a generator with non-zero capacity ct.remove_bus({845}) ct.scale_plant_capacity(resource="ng", plant_id={0: 0}) ct.remove_bus({845})