title: Pytest - how to link a specific setup and teardown functions to a specific test function?
body: <p>Similar questions have been asked but none of the answers solved my problem:</p>
  
  <p>I have the following 3 functions:</p>
  
  <pre><code>def specific_setup_function():
      print("\n\nsetup_function\n\n")
  
  
  def specific_teardown_function():
      print("\n\nteardown_function\n\n")
  
  
  def specific_test():
      print('\n\nTEST\n\n')
  </code></pre>
  
  <p>How do i make pytest execute <code>specific_test()</code> right after <code>specific_setup_function</code> and right before <code>specific_teardown_function()</code>, regardless of how many other functions there are in my test module ?</p>
  
  <p>In this example it will execute in the specified order because these are the only functions but in the more general case i want the previous code to be equivalent to the following, ALWAYS:</p>
  
  <pre><code>def test():
      specific_setup_function()
      print('\n\nTEST\n\n')
      specific_teardown_function()
  </code></pre>
  
  <p>So <code>specific_test</code> will be linked to  <code>specific_setup_function</code> and <code>specific_teardown_function</code>.</p>
  
  <p>Is there a way ?</p>