title: Establish which class implementation is imported to module
body: <p>I wish to unittest the following:</p>
  
  <pre><code>import sys
  if sys.platform == "darwin":
      import OSX.Leap as Leap
  elif 'linux' in sys.platform:
      import Linux.Leap as Leap
  </code></pre>
  
  <p>How do I establish if I have imported OSX.Leap or Linux.Leap in my test? In other words, how do I know which version of the Leap class I have added to the module?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>If I use <code>inspect</code> I can get:</p>
  
  <pre><code>&lt;module 'Linux.params' from 'Linux/params.pyc'&gt;
  </code></pre>
  
  <p>for:</p>
  
  <pre><code>inspect.getmodule(Leap)
  </code></pre>