title: How to check a member variable with py.test skipif?
body: <p>In my <code>setUp</code> function in a TestCase I set a member variable <code>is_type</code> to True or False. I have a few tests in the class which shouldn't be run if the value is false. I don't know how to do this with the <code>skipif</code> functionality.</p>
  
  <pre><code>@py.test.mark.skipif( not ???.is_type )
  def test_method(self):
     ...
  </code></pre>
  
  <p><code>self</code> doesn't work for <code>???</code> since it's not in the object yet.  How can I refer to the <code>is_type</code> variable?</p>
  
  <hr>
  
  <p>More complete example:</p>
  
  <pre><code>class DBTest(unittest.TestCase):
      def setUp(self):
          self.is_dynamo = os.environ.get( 'TEST_DB', '' ) == 'Dynamo'
  
      def test_account_ts(self):
          if not self.is_dynamo:
              return
  
          ...
  </code></pre>
  
  <p>How can I transform that <code>if not self.is_dynamo</code> into a py.test skipif condition instead?</p>