How to resolve unittest ImportErrors
<p>When I run:</p>

<p><code>python -m unittest discover unit_tests</code></p>

<p>or</p>

<p><code>python setup.py test</code></p>

<p>I receive lots of <code>ImportErrors</code> for the <a href="https://github.com/nueverest/blowdrycss" rel="nofollow">blowdrycss project</a>.</p>

<p>Sample:</p>

<pre><code>test_BreakpointParser (unittest.loader._FailedTest) ... ERROR
test_classExtractor (unittest.loader._FailedTest) ... ERROR
test_classPropertyParser (unittest.loader._FailedTest) ... ERROR
test_colorParser (unittest.loader._FailedTest) ... ERROR
test_CSSBuilder (unittest.loader._FailedTest) ... ERROR
test_CSSFile (unittest.loader._FailedTest) ... ERROR
test_CSSPropertyValueParser (unittest.loader._FailedTest) ... ERROR
...
ImportError: No module named 'settings'
ImportError: No module named 'blowdrycss_settings'
ImportError: No module named 'blowdrycss.blowdrycss_settings'
ImportError: No module named 'utilities'
ImportError: No module named 'breakpointparser'
</code></pre>

<p>Project structure:</p>

<pre><code>blowdrycss/
    blowdrycss/
        settings/
            __init__.py
            blowdrycss_settings.py
        unit_tests/
            __init__.py
            test_BreakpointParser.py
            test_*.py
            ...
        __init__.py
        blowdrycss.py
        breakpointparser.py
        utilities.py
        ...    
</code></pre>

<p>What is strange is that when I run these tests from PyCharm everything passes, but when I run from the command line it breaks.  </p>

<p>Maybe it is a simple configuration issue, but I'm not sure what I'm doing wrong.</p>

<p>How do I resolve these ImportErrors?</p>