title: FunctionTestCase are not being discovered by python unittest's default loader
body: <p>I am trying to use the <code>FunctionTestCase</code> of python's <em>unittest</em> module, assume I have something like:</p>
  <pre><code>class TestSomthing(unittest.TestCase):
      ...
  
  
  def test_function_testcase(value):
      assert value
  
  
  function_testcase_success = unittest.FunctionTestCase(lambda: test_function_testcase(True))
  
  </code></pre>
  <p>Neither this:</p>
  <p><code>python -m unittest discover</code></p>
  <p>Or this:</p>
  <pre><code>if __name__ == '__main__':
      unittest.main()
  </code></pre>
  <p>were able to discover and load <code>function_testcase_success</code>, while <code>TestSomthing</code> and other normal <code>TestCase</code> subclasses are being discovered and loaded successfully. Am I doing somthing wrong?</p>
  <p><strong>Update:</strong></p>
  <p>As workaround, I have added the <code>FunctionTestCase</code> instance manually:</p>
  <pre><code>    loader = unittest.TestLoader()
  
      tests = loader.loadTestsFromModule(my_module)
  
      tests.addTests([function_testcase_success]) 
  </code></pre>
  <p>I think the reason this type of tescases is not loaded, is the following snippet taken from <code>unittest.TestLoader.loadTestsFromModule</code>:</p>
  <pre><code>    tests = []
      for name in dir(module):
          obj = getattr(module, name)
          if isinstance(obj, type) and issubclass(obj, case.TestCase):
              tests.append(self.loadTestsFromTestCase(obj))
  </code></pre>
  <p>As I have noticed this snippet check for <code>issubclass</code>, and the typical intialization of <code>FunctionTestCase(test_func)</code> return an instance of <code>TestCase</code> not a subclass.</p>