title: Decorator functions in classes. Should each instantiation result in decorator function being run again?
body: <p>I have read around; and the closest I can find is a mention that using generator functions and decorator functions are not supported</p>
  
  <p><code>class  getsize</code>  with methods: <code>setUp</code> <code>tearDown</code> and <code>getfilesize</code>
  With the nose <code>with_setup(setUp,tearDown)</code>.</p>
  
  <p>I also have a distinct generation function (in the same file) that 
  uses a loop to create an  instance of the  <code>getsize class</code> and call the method <code>getfilesize</code>.</p>
  
  <p>When I run the file via <code>nosetests;</code> I find that the @with_setup is only run done when nose runs the class. </p>
  
  <p>When I run the generator function; it never gets accessed.  As a work around I add in calls to the <code>setUp</code> and <code>tearDown</code> methods; and I get the expected results.This is really bugging me and I have made a considerable effort to track down an answer.</p>
  
  <p><em>[Additional] This is the code section:</em></p>
  
  <pre><code>  class Test_getFileSize:
      import logging
      from nose.tools import with_setup
      log = logging.getLogger("Test getfilesize")
          def setUp(self):
              print " running Setup",self.testsize
              with open(self.mytestfile, "wb") as out:
              out.seek(self.testsize-1)
              out.write('0')
              out.close()
          def tearDown(self):
              import os
              print "Running tearDown"
              os.remove(self.mytestfile)
      @with_setup(setUp,tearDown)
      def test_getFileSize(self):`
  </code></pre>
  
  <p><em>[rest of this method and the init follow but are not pertinent to the question.</em></p>