How do I import a module one level above and use the most recent definitions?
<p><strong>tests.py</strong></p>

<pre><code>import unittest
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
import my_module.ext

print sys.path
print dir(my_module.ext)
</code></pre>

<p>But <code>dir</code> gives me the old functions. A month ago I <code>easy_install</code> an older version, and when I run <code>python tests.py</code> I get all the old functions instead.</p>

<p>I need the new definitions which are currently living in <code>my_module.ext</code></p>

<pre><code>../
  - my_module/
      - __init__.py
      - ext.py
      - core.py
      - lib.py
  - tests
      - tests.py
</code></pre>

<p>Any idea how to achieve this? Thanks. The reason of not installing it is because it's a good practice to run tests before deploying the library. </p>

<p>FYI, they are not classes. <code>my_module</code> can be built into an egg.</p>
