title: Pass associative array as bash arguments to a python/pytest script
body: <p>I have declared an associative array in main_script.sh(bash version 4.4.19(2)) as follows:</p>
  <pre><code>    #!/bin/bash
      declare -A hash_map
      hash_map[&quot;MOCK_KEY&quot;]=&quot;99999&quot;
  
      pytest --name abc --strict_mode True --hash_details hash_map ./test_file.py;
  </code></pre>
  <p>I have a conftest.py file as follows:</p>
  <pre><code>    parser.addoption(&quot;--hash_details&quot;, action=&quot;store&quot;, default=&quot;default name&quot;)
      parser.addoption(&quot;--format_name&quot;, action=&quot;store&quot;, default=&quot;default name&quot;)
      parser.addoption(&quot;--strict_mode&quot;, action=&quot;store&quot;, default=&quot;default name&quot;)
  </code></pre>
  <p>Contents of test_file.py:</p>
  <pre><code>    @pytest.fixture()
      def name(pytestconfig):
          return pytestconfig.getoption(&quot;name&quot;)
  
      @pytest.fixture()
      def strict_mode(pytestconfig):
          return pytestconfig.getoption(&quot;strict_mode&quot;)
  
      @pytest.fixture()
      def trace_details(pytestconfig):
          return pytestconfig.getoption(&quot;hash_details&quot;)
  
      def test_function(name, strict_mode, hash_details):
          print(&quot;hash_details&quot;, hash_details)
  </code></pre>
  <p>When I print hash_details in test_file.py, I expected a dictionary with the key-value defined in the bash script but I got the string &quot;hash_map&quot;. How can I retrieve the hash_map dictionary?</p>