title: How do you unit test a nested function?
body: <p>How would you unit test the nested function <code>f1()</code> in the following example?</p>
  
  <pre><code>def f():
      def f1():
         return 1
      return 2
  </code></pre>
  
  <p>Or should functions that need testing not be nested?</p>