title: Grouping tests in pytest: Classes vs plain functions
body: <p>I'm using pytest to test my app.
  pytest supports 2 approaches (that I'm aware of) of how to write tests:</p>
  <ol>
  <li>In classes:</li>
  </ol>
  <blockquote>
  <p>test_feature.py -&gt; class TestFeature -&gt; def test_feature_sanity</p>
  </blockquote>
  <ol start="2">
  <li>In functions:</li>
  </ol>
  <blockquote>
  <p>test_feature.py -&gt; def test_feature_sanity</p>
  </blockquote>
  <p>Is the approach of grouping tests in a class needed? Is it allowed to backport unittest builtin module?
  Which approach would you say is better and why?</p>