code: def test_slurm_executor(tmp_path: Path, monkeypatch) -> None:
      monkeypatch.setattr(
          debug.DebugExecutor, "_valid_parameters", lambda: {"blabla"}
      )
      with test_slurm.mocked_slurm():
          executor = auto.AutoExecutor(folder=tmp_path)
      assert executor.cluster == "slurm"
  
      # local_xxx parameter is ignored
      executor.update_parameters(
          mem_gb=2, name="machin", debug_blabla="blublu"
      )
      params = executor._executor.parameters
      assert params == {"mem": "2GB", "job_name": "machin"}
  
      # shared parameter with wrong type
      with pytest.raises(AssertionError):
          executor.update_parameters(mem_gb="2.0GB")  # should be int
      # unknown shared parameter
      with pytest.raises(NameError):
          executor.update_parameters(blublu=2.0)
      # unknown slurm parameter
      with pytest.raises(NameError):
          executor.update_parameters(slurm_host_filter="blublu")
      # check that error message contains all
      with pytest.raises(
          NameError, match=r"debug_blublu.*\n.*local_num_threads"
      ):
          executor.update_parameters(
              debug_blublu=2.0, local_num_threads=4
          )
  
file_path: submitit/submitit/auto/test_auto.py
imports: import sys
  from pathlib import Path
  import pytest
  from ..local import debug
  from ..slurm import test_slurm
  from .None import auto
label_desc: Use image node_id 1 for calling a global function with example usage: test_slurm_executor(tmp_path, monkeypatch) without return types