title: Pytest - How to pass an argument to setup_class?
body: <p>I have some code as shown below.
  I am getting a <code>too few args</code> error when I run it.
  I am not calling <code>setup_class</code> explicitly, so not sure how to pass any parameter to it.
  I tried decorating the method with <code>@classmethod</code>, but still see the same error.</p>
  
  <p>The error that I am seeing is this - <code>E           TypeError: setup_class() takes exactly 2 arguments (1 given)</code></p>
  
  <p>One point to note - If I do not pass any parameter to the class, and pass only <code>cls</code>, then I am not seeing the error.</p>
  
  <p>Any help is greatly appreciated.</p>
  
  <p>I did review these questions <a href="https://stackoverflow.com/questions/19736363/pytest-how-to-pass-a-class-parameter-to-setup-class">question #1</a> and <a href="https://stackoverflow.com/questions/12538808/pytest-2-3-adding-teardowns-within-the-class">question #2</a>prior to posting. I did not understand the solutions posted to these questions, or how they would work.</p>
  
  <pre><code>class A_Helper:
      def __init__(self, fixture):
          print "In class A_Helper"
  
      def some_method_in_a_helper(self):
          print "foo"
  
  class Test_class:
      def setup_class(cls, fixture):
          print "!!! In setup class !!!"
          cls.a_helper = A_Helper(fixture)
  
      def test_some_method(self):
          self.a_helper.some_method_in_a_helper()
          assert 0 == 0
  </code></pre>