docstr: Tests that we can override things in the configs merged in only during the sweep config construction
  db.user=someone does not exist db_conf.yaml, and is only appear when we merge in db=mysql or db=postgresql.
  This presents a tricky situation when operating in strict mode, this tests verifies it's handled correctly.
docstr_tok: ["Tests","that","we","can","override","things","in","the","configs","merged","in","only","during","the","sweep","config","construction","db.user=someone","does","not","exist","db_conf.yaml",",","and","is","only","appear","when","we","merge","in","db=mysql","or","db=postgresql",".","This","presents","a","tricky","situation","when","operating","in","strict","mode",",","this","tests","verifies","it","'s","handled","correctly","."]
code: def test_sweep_and_override(
      self,
      hydra_sweep_runner: TSweepRunner,
      launcher_name: str,
      overrides: List[str],
      tmpdir: Path,
  ) -> None:
      """
      Tests that we can override things in the configs merged in only during the sweep config construction
      db.user=someone does not exist db_conf.yaml, and is only appear when we merge in db=mysql or db=postgresql.
      This presents a tricky situation when operating in strict mode, this tests verifies it's handled correctly.
      """
      base_overrides = [
          "hydra/launcher=" + launcher_name,
          "db=mysql,postgresql",
          "db.user=someone",
      ]
      sweep = hydra_sweep_runner(
          calling_file=None,
          calling_module="hydra.test_utils.a_module",
          task_function=None,
          config_path="configs",
          config_name="db_conf.yaml",
          overrides=base_overrides + overrides,
          temp_dir=tmpdir,
      )
      expected_overrides = [
          ["db=mysql", "db.user=someone"],
          ["db=postgresql", "db.user=someone"],
      ]
      expected_conf = [
          {
              "db": {
                  "driver": "mysql",
                  "password": "secret",
                  "user": "someone",
              }
          },
          {
              "db": {
                  "user": "someone",
                  "driver": "postgresql",
                  "password": "drowssap",
                  "timeout": 10,
              }
          },
      ]
      with sweep:
          assert sweep.returns is not None
          assert len(sweep.returns[0]) == 2
          for i in range(2):
              job_ret = sweep.returns[0][i]
              assert job_ret.overrides == expected_overrides[i]
              assert job_ret.cfg == expected_conf[i]
              verify_dir_outputs(job_ret, job_ret.overrides)
  
imports: import copy
  import os
  import re
  from pathlib import Path
  from typing import Any, Callable, List, Optional, Set
  from omegaconf import DictConfig, OmegaConf
  from pytest import mark, param, raises
  from hydra import TaskFunction
  from hydra.errors import HydraException
  from hydra.test_utils.test_utils import TSweepRunner, integration_test, verify_dir_outputs
label_desc: Use image node_id 9 for calling the LauncherTestSuite obj's underlying member method code with example usage: obj.test_sweep_and_override(hydra_sweep_runner, launcher_name, overrides, tmpdir) without return types