title: Passing parameters through different conftest files
body: <p>I'm trying to figure out how the hierarchy works in pytest. I have a top conftest file in a parent folder but can't seem to be able to pass some arguments from this conftest file to a lower one. How can I proceed ? (I'm new to pytest)</p>
  
  <p>Let's use this example for reference:</p>
  
  <ul>
  <li>conftest.py</li>
  <li>testcases/
  
  <ul>
  <li>conftest.py</li>
  <li>test_example.py</li>
  </ul></li>
  </ul>
  
  <p>And the following code:
  <em>conftest.py</em></p>
  
  <pre><code>import pytest
  
  @pytest.fixture(scope='session', autouse=True)
  def setup_session(request):
      print("top setup method")
      if request.instance:
          t = request.instance
          t.top = "top level"
  
      yield
  </code></pre>
  
  <p><em>testcases/conftest.py</em></p>
  
  <pre><code>import pytest
  
  @pytest.fixture(scope='function', autouse=True)
  def setup_function(request):
      print("bottom setup method")
      if request.instance:
          t = request.instance
          t.bottom = "bottom level"
  
      yield
  </code></pre>
  
  <p><em>testcases/test_example.py</em></p>
  
  <pre><code>class TestExample(object):
  
  def test_example(self):
      print(self.bottom)
      print(self.top)
  </code></pre>
  
  <p>I know this code is rubbish but I want to know of a way to declare several test setup functions at different level while still being able to recover parameters from one conftest to another. And get all these parameters in the test. Is that even possible ?</p>