title: Split a test in different functions with pytest
body: <p>I'm using pytest and have multiple tests to run to check an issue.</p>
  
  <p>I would like to split all tests into different functions like this:</p>
  
  <pre><code># test_myTestSuite.py
  
  @pytest.mark.issue(123)
  class MyTestSuite():
  
      def test_part_1():
          result = do_something()
          assert result == True
  
      def test_part_2():
          result = do_an_other_something()
          assert result == 'ok'
  </code></pre>
  
  <p>of course, I implemented <code>issue</code> in conftest.py</p>
  
  <pre><code># conftest.py
  
  def pytest_addoption(parser):
      group = parser.getgroup('Issues')
  
      group.addoption('--issue', action='store',
                      dest='issue', default=0,
                      help='')
  </code></pre>
  
  <p>but I don't know how to hook once after testing <code>MyTestSuite</code> and check that all tests of <code>MyTestSuite</code> correctly passed.</p>
  
  <p>Does anyone have any ideas?</p>
  
  <p>PS: this is my first post on StackOverflow.</p>