class_docstr: Test functionality of generic converter of unknown configuration file type.
docstr: Test that set_state_dict sets state properly to generate new config.
docstr_tok: ["Test","that","set_state_dict","sets","state","properly","to","generate","new","config","."]
code: def test_set_state_dict(self, tmpdir, generic_converter):
      """Test that set_state_dict sets state properly to generate new config."""
      generic_converter.set_state_dict(
          {
              "expression_prefix": "",
              "has_leading": {"voici": "/"},
              "regex": generic_converter.regex.pattern,
              "template": """\
  voici = {/voici}
  voila = voici + {voila}""",
          }
      )
  
      output_file = str(tmpdir.join("output.lalal"))
  
      generic_converter.generate(
          output_file, {"/voici": "me voici", "voila": "me voila"}
      )
  
      with open(output_file) as f:
          out = f.read()
  
      assert (
          out
          == """\
  voici = me voici
  voila = voici + me voila"""
      )
  
file_path: orion/tests/unittests/core/io/test_converters.py
imports: import os
  import pytest
  from orion.core.io.convert import GenericConverter, JSONConverter, YAMLConverter, infer_converter_from_file_type
label_desc: Use image node_id 8 for calling the TestGenericConverter obj's underlying member method code with example usage: obj.test_set_state_dict(tmpdir, generic_converter) without return types