title: Testing class methods with pytest
body: <p>In the documentation of pytest various examples for test cases are listed. Most of them show the test of functions. But I’m missing an example of how to test classes and class methods. Let’s say we have the following class in the module <code>cool.py</code> we like to test:</p>
  
  <pre><code>class SuperCool(object):
  
      def action(self, x):
          return x * x
  </code></pre>
  
  <p>How does the according test class in <code>tests/test_cool.py</code> have to look?</p>
  
  <pre><code>class TestSuperCool():
  
      def test_action(self, x):
          pass
  </code></pre>
  
  <p>How can <code>test_action()</code> be used to test <code>action()</code>?</p>