title: how to pass dictionary to test
body: <p>I am quite new in the writing of tests (for python) and so I have now the question how can I pass a dictionary to a test-function? At the moment I do the following:</p>
  
  <pre><code>import os
  import sys
  import shutil
  from app.views import file_io
  import pytest
  from tempfile import mkdtemp
  import codecs
  
  @pytest.fixture()
  def tempdir():
      tempdir = mkdtemp()
      yield tempdir
      shutil.rmtree(tempdir)
  
  articles = [
          ["", "README.md", "# Hallo Welt", "&lt;h1&gt;Hallo Welt&lt;/h1&gt;\n"],
          ["test", "article.md", "# Hallo Welt", "&lt;h1&gt;Hallo Welt&lt;/h1&gt;\n"]
  ]
  
  
  @pytest.mark.parametrize("dir, file, content_plain, content_md", articles)
  def test_readRaw(tempdir, dir, file, content_plain, content_md):
      dest_path=os.path.join(tempdir, dir)
      os.makedirs(dest_path, exist_ok=True)
  
      with codecs.open(os.path.join(dest_path, file), 'w', 'utf-8') as fh:
          fh.write(content_plain)
  
      assert file_io.readRaw(os.path.join(dest_path, file)) == content_plain
  </code></pre>
  
  <p>and my idea/hope is that I could modify the code so I can do something like:</p>
  
  <pre><code>articles = [
                 { "dir": "",
                   "filename": "README.md",
                   "content_md": "# Hello World",
                   "content_html": "&lt;h1&gt;Hello World&lt;/h1&gt;\n" },
                 { "dir": "test",
                   "filename": "article.md",
                   "content_md": "# Hallo Welt",
                   "content_html": "&lt;h1&gt;Hallo Welt&lt;/h1&gt;\n"}
  
  ]
  
  
  @pytest.mark.parametrize(**articles, articles)
  def test_readRaw(tempdir, **articles):
      with codecs.open(os.path.join(dir, file), 'w', 'utf-8') as fh:
          fh.write(content_md)
  
      assert file_io.readRaw(os.path.join(dir, file)) == content_md
  </code></pre>
  
  <p>especially I would like to avoid the mentioning of all keys so I can extend the dictionary if I miss something without modified all tests.</p>
  
  <p>Maybe this is is a silly question but as I say I am just beginning with this topic and so I would very thanksful for every a hint how can I do this (or what is a better way).
  best regards
  Dan</p>