title: How to check if a method exists in TDD?
body: <p>In a strict Test Driven development methodology every step is required to be tested before hand. Even the existence of a class or of its methods have - strictly speaking - to be tested before they are actually even created.</p>
  
  <p>I have a problem to make write tests to see if a method exists.</p>
  
  <pre><code>class BasicTests(unittest.TestCase):
  
      def setUp(self):
          self.test = RandomGenClass()        
  
      def testRandomGenClassExists(self):
          """ Does the class exist? """        
          self.assert_(self.test is not None)
  
      def testMyMethodExists(self):
          """ Does MyMethod() exist?"""
          result = self.test.myMethod()
          self.assert_(result is not None)
  </code></pre>
  
  <p>In both cases Python would already fail if the class didn't exist.  The test never gets to assert. Is there a better way to achieve this?</p>