// Test that dropping all channels a projector applies to will lead to the
// removal of said projector.
raw = read_raw_fif(fif_fname).apply_proj()
n_projs = len(raw.info["projs"])
raw.drop_channels(raw.info["projs"][-1]["data"]["col_names"]) // EEG proj
assert len(raw.info["projs"]) == n_projs - 1
After Change
// Test that dropping all channels a projector applies to will lead to the
// removal of said projector.
raw = read_raw_fif(fif_fname)
n_projs = len(raw.info["projs"])
eeg_names = raw.info["projs"][-1]["data"]["col_names"]
with pytest.raises(RuntimeError, match="loaded"):
raw.copy().apply_proj().drop_channels(eeg_names)
raw.load_data().drop_channels(eeg_names) // EEG proj
assert len(raw.info["projs"]) == n_projs - 1