title: In pytest, how to make sure the module level fixture is called before class level
body: <p>My pytest is old(version 2.8.3).</p>
  
  <pre><code>pytestmark = pytest.mark.usefixtures("module_level")
  
  @pytest.fixture(scope='module')
  def module_level(request):
      print("module start")
      def fin():
          print("module end")
      request.addfinalizer(fin)
  
  @pytest.fixture(scope='class')
  def class_level(request):
      print("class start")
      def fin():
          print("class end")
      request.addfinalizer(fin)
  
  @pytest.mark.usefixtures("class_level")
  class TestMyClass:  
      def test_func(self):
          pass
  </code></pre>
  
  <p>However, the order I got is:</p>
  
  <pre><code>class start
  module start
  class end
  module end
  </code></pre>
  
  <p>which is not what I want. So what's the right way to write a module level setup/cleanup fixture (and make sure it does the setup before everything and clean up after everything)?</p>